導航:首頁 > 動漫圖片 > 怎麼解碼圖片

怎麼解碼圖片

發布時間:2022-11-28 22:14:38

⑴ 手機上怎麼把有馬賽克的圖片解碼

當然有了!

希望可以採納! 謝謝

⑵ tk圖怎麼解碼

用這個工具,RPGViewer圖片資源提取工具。


解碼(Decoding)是指受傳者將接受到的符號或代碼還原為信息的過程,與編碼過程相對應。解碼活動要受到受眾的社會地位和文化背景的影響,體現社會的多樣性。


受眾的解碼還具有同向性、對抗性、妥協性三種形態。編碼和解碼的連通過程實質上就是簡單的傳播過程。如果說符號具或符號的表現層面是由編碼者決定的,那麼符號義或符號的內容層面則是由解碼者決定的。


在計算機網路中,網路通過通信網將計算機互聯以實現資源共享和數據傳輸的。當使用的通信網信號形式和傳輸設備的信號形式不一樣時。


就必須進行信號形式的轉換。一般將在發送方進行的信號形式轉換稱為編碼,接收方進行的信號形式的轉換成為解碼。

DFT 演算法

用FFT演算法解碼,每幀信號要做N= 256 點FFT,而組成所有DTMF信號的頻率只有 8 個,於是可以只對每幀信號算 8 個最具有特徵的特徵點的DFT,以避開 FFT中許多無意義的計算。

DFT演算法解碼過程如下:
1.對每幀 DTMF 信號在 8 個特定的頻率上做DFT,畫幅頻譜圖,從中找出代表各信號的特徵字。

2.將各 DTMF 信號還原為相應數字鍵。

⑶ 圖片解碼怎麼解

1、你能保存到硬碟上的動態圖片,它的擴展名是jpg。那個文件實際上是gif格式,只是擴展名被改成了jpg,在acdsee中查看,在最下方狀態欄圖片解析度的右邊就

如何:編碼和解碼 PNG 圖像

' Open a Stream and decode a PNG image Dim imageStreamSource As New FileStream("smiley.png", FileMode.Open, FileAccess.Read, FileShare.Read) Dim decoder As New PngBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default) Dim bitmapSource As BitmapSource = decoder.Frames(0) ' Draw the Image Dim myImage As New Image() myImage.Source = bitmapSource myImage.Stretch = Stretch.None myImage.Margin = New Thickness(20) // Open a Stream and decode a PNG image Stream imageStreamSource = new FileStream("smiley.png", FileMode.Open, FileAccess.Read, FileShare.Read); PngBitmapDecoder decoder = new PngBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default); BitmapSource bitmapSource = decoder.Frames[0]; // Draw the Image Image myImage = new Image(); myImage.Source = bitmapSource; myImage.Stretch = Stretch.None; myImage.Margin = new Thickness(20); // Open a Stream and decode a PNG image Stream^ imageStreamSource = gcnew FileStream("smiley.png", FileMode::Open, FileAccess::Read, FileShare::Read); PngBitmapDecoder^ decoder = gcnew PngBitmapDecoder(imageStreamSource, BitmapCreateOptions::PreservePixelFormat, BitmapCacheOption::Default); BitmapSource^ bitmapSource = decoder->Frames[0]; // Draw the Image Image^ myImage = gcnew Image(); myImage->Source = bitmapSource; myImage->Stretch = Stretch::None; myImage->Margin = System::Windows::Thickness(20); 本示例演示如何使用 PngBitmapEncoder 將 BitmapSource 編碼為 PNG 圖像。 Dim width As Integer = 128 Dim height As Integer = 128 Dim stride As Integer = width Dim pixels(height * stride) As Byte ' Define the image palette Dim myPalette As BitmapPalette = BitmapPalettes.Halftone256 ' Creates a new empty image with the pre-defined palette Dim image As BitmapSource = System.Windows.Media.Imaging.BitmapSource.Create( _ width, height, 96, 96, PixelFormats.Indexed8, myPalette, pixels, stride) Dim stream As New FileStream("new.png", FileMode.Create) Dim encoder As New PngBitmapEncoder() Dim myTextBlock As New TextBlock() myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString() encoder.Interlace = PngInterlaceOption.On encoder.Frames.Add(BitmapFrame.Create(image)) encoder.Save(stream) int width = 128; int height = 128; int stride = width; byte[] pixels = new byte[height * stride]; // Define the image palette BitmapPalette myPalette = BitmapPalettes.Halftone256; // Creates a new empty image with the pre-defined palette BitmapSource image = BitmapSource.Create( width, height, 96, 96, PixelFormats.Indexed8, myPalette, pixels, stride); FileStream stream = new FileStream("new.png", FileMode.Create); PngBitmapEncoder encoder = new PngBitmapEncoder(); TextBlock myTextBlock = new TextBlock(); myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString(); encoder.Interlace = PngInterlaceOption.On; encoder.Frames.Add(BitmapFrame.Create(image)); encoder.Save(stream); int width = 128; int height = 128; int stride = width; array<System::Byte>^ pixels = gcnew array<System::Byte>(height * stride); // Define the image palette BitmapPalette^ myPalette = BitmapPalettes::Halftone256; // Creates a new empty image with the pre-defined palette BitmapSource^ image = BitmapSource::Create(width, height, 96, 96, PixelFormats::Indexed8, myPalette, pixels, stride); FileStream^ stream = gcnew FileStream("new.png", FileMode::Create); PngBitmapEncoder^ encoder = gcnew PngBitmapEncoder(); TextBlock^ myTextBlock = gcnew TextBlock(); myTextBlock->Text = "Codec Author is: " + encoder->CodecInfo->Author->ToString(); encoder->Interlace = PngInterlaceOption::On; encoder->Frames->Add(BitmapFrame::Create(image)); encoder->Save(stream);

⑸ 怎樣將很多圖片自動重命名,編碼

圖片批量重命名並編號:

步驟1,下載安裝軟體後打開,然後點擊【添加文件】按鈕,將需要重命名的圖片文件添加到軟體中,也可以直接將圖片拖到軟體中。

⑹ 如何在Android用FFmpeg解碼圖像

fetch code

用git把ffmpeg(我用的github上FFmpeg-Android)和x264(vlc的官方git)分別都clone下來。

build x264

在x264目錄裡面寫一個myconfig.sh(其實直接把這些命令打在終端也行,問題是有的時候需要改來改去,不如寫個文件改起來方便)

export NDK=/opt/android-ndk

export PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt

export PLATFORM=$NDK/platforms/android-14/arch-arm

export PREFIX=/home/mingkai/softwares/x264

./configure \

--enable-pic \

--enable-static \

--enable-shared \

--disable-asm \

--disable-cli \

--host=arm-linux \

--cross-prefix="/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-"
\

--sysroot=$PLATFORM \

--prefix=$PREFIX

其中prefix貌似直接用"arm-linux-androideabi-「也可以。

然後可以make和make install了。(記得改PREFIX等環境變數)

build FFmpeg

這個是從github上FFmpeg-Android裡面的FFmpeg-Android.sh裡面改了改一些參數。

最主要的是FFMPEG_FLAGS,裡面都是一些關於FFmpeg的參數設定,尤其是是否啟用encoder/decoder之類的。

還有一點就是再下面EXTRA_CFLAGS裡面加上

「-I/path/to/x264/include」

EXTRA_LDFLAGS裡面加上

「-L/path/to/x264/lib -lx264」。

⑺ 別人發來的圖片有馬賽克 可以解碼嗎

解決方法 1、首先利用PS打開要處理的含有馬賽克的圖片。 2、雙擊背景層,將其轉換為普通圖層「圖層0」。 3、接下來,點擊「選區工具」,然後選擇要消除馬賽克的區域,執行「濾鏡」→「銳化」→「智能銳化」。 4、適當的增加「數量」和「半徑」,使馬賽克部分對比度增強,同時看起來顯得更容易區分。 5、點擊「選擇」→「取消選擇」項來取消選區,然後選擇「仿製圖章工具」。 6、按住「Alt」鍵不放,點擊要采樣的區域,然後不斷塗抹要應用的位置,從而不斷取消馬賽克部分的圖像。 7、通過不斷選擇周圍的部分來使相鄰部分的圖像盡量保持一致。

⑻ 圖片怎麼解碼

用這個工具
RPGViewer圖片資源提取工具
(這是軒轅春秋論壇網友自製的圖片提取工具,操作非常簡單,可以提取非常多游戲的圖片.你用用就知道)
下載

⑼ 如何在Android用FFmpeg解碼圖像

創建一個VideoPicture結構體用來保存解碼出來的圖像。

LOCAL_PATH := $(call my-dir)
###########################
#
# SDL shared library
#
###########################
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,, \
$(wildcard $(LOCAL_PATH)/src/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/mmy/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/mmy/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/mmy/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/test/*.c))
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
include $(BUILD_SHARED_LIBRARY)
###########################
#
# SDL static library
#
###########################
#LOCAL_MODULE := SDL2_static
#LOCAL_MODULE_FILENAME := libSDL2
#LOCAL_SRC_FILES += $(LOCAL_PATH)/src/main/android/SDL_android_main.c
#LOCAL_LDLIBS :=
#LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
#include $(BUILD_STATIC_LIBRARY)

二、參考[原]如何在Android用FFmpeg解碼圖像, 在工程中新建一個ffmpeg文件夾,將與ffmpeg相關的頭文件include進來。ffmpeg文件夾下的Android.mk內容:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := /path/to/build/ffmpeg/libffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)

三、新建player文件夾,用來編寫解碼與顯示文件。player.c文件內容:

/*
* SDL_Lesson.c
*
* Created on: Aug 12, 2014
* Author: clarck
*/
#include <jni.h>
#include <android/native_window_jni.h>
#include "SDL.h"
#include "SDL_thread.h"
#include "SDL_events.h"
#include "../include/logger.h"
#include "../ffmpeg/include/libavcodec/avcodec.h"
#include "../ffmpeg/include/libavformat/avformat.h"
#include "../ffmpeg/include/libavutil/pixfmt.h"
#include "../ffmpeg/include/libswscale/swscale.h"
int main(int argc, char *argv[]) {
char *file_path = argv[1];
LOGI("file_path:%s", file_path);
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame, *pFrameYUV;
AVPacket *packet;
uint8_t *out_buffer;
SDL_Texture *bmp = NULL;
SDL_Window *screen = NULL;
SDL_Rect rect;
SDL_Event event;
static struct SwsContext *img_convert_ctx;
int videoStream, i, numBytes;
int ret, got_picture;
av_register_all();
pFormatCtx = avformat_alloc_context();
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
LOGE("Could not initialize SDL - %s. \n", SDL_GetError());
exit(1);
}
if (avformat_open_input(&pFormatCtx, file_path, NULL, NULL) != 0) {
LOGE("can't open the file. \n");
return -1;
}
if (avformat_find_stream_info(pFormatCtx, NULL) < 0) {
LOGE("Could't find stream infomation.\n");
return -1;
}
videoStream = 1;
for (i = 0; i < pFormatCtx->nb_streams; i++) {
if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
videoStream = i;
}
}
LOGI("videoStream:%d", videoStream);
if (videoStream == -1) {
LOGE("Didn't find a video stream.\n");
return -1;
}
pCodecCtx = pFormatCtx->streams[videoStream]->codec;
pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
if (pCodec == NULL) {
LOGE("Codec not found.\n");
return -1;
}
if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
LOGE("Could not open codec.\n");
return -1;
}
pFrame = av_frame_alloc();
pFrameYUV = av_frame_alloc();
//---------------------------init sdl---------------------------//
screen = SDL_CreateWindow("My Player Window", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, pCodecCtx->width, pCodecCtx->height,
SDL_WINDOW_FULLSCREEN | SDL_WINDOW_OPENGL);
SDL_Renderer *renderer = SDL_CreateRenderer(screen, -1, 0);
bmp = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12,
SDL_TEXTUREACCESS_STREAMING, pCodecCtx->width, pCodecCtx->height);
//-------------------------------------------------------------//

img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height,
pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height,
AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
numBytes = avpicture_get_size(AV_PIX_FMT_YUV420P, pCodecCtx->width,
pCodecCtx->height);
out_buffer = (uint8_t *) av_malloc(numBytes * sizeof(uint8_t));
avpicture_fill((AVPicture *) pFrameYUV, out_buffer, AV_PIX_FMT_YUV420P,
pCodecCtx->width, pCodecCtx->height);
rect.x = 0;
rect.y = 0;
rect.w = pCodecCtx->width;
rect.h = pCodecCtx->height;
int y_size = pCodecCtx->width * pCodecCtx->height;
packet = (AVPacket *) malloc(sizeof(AVPacket));
av_new_packet(packet, y_size);
av_mp_format(pFormatCtx, 0, file_path, 0);
while (av_read_frame(pFormatCtx, packet) >= 0) {
if (packet->stream_index == videoStream) {
ret = avcodec_decode_video2(pCodecCtx, pFrame, &got_picture,
packet);
if (ret < 0) {
LOGE("decode error.\n");
return -1;
}
LOGI("got_picture:%d", got_picture);
if (got_picture) {
sws_scale(img_convert_ctx,
(uint8_t const * const *) pFrame->data,
pFrame->linesize, 0, pCodecCtx->height, pFrameYUV->data,
pFrameYUV->linesize);
////iPitch 計算yuv一行數據占的位元組數
SDL_UpdateTexture(bmp, &rect, pFrameYUV->data[0], pFrameYUV->linesize[0]);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, bmp, &rect, &rect);
SDL_RenderPresent(renderer);
}
SDL_Delay(50);
}
av_free_packet(packet);
SDL_PollEvent(&event);
switch (event.type) {
case SDL_QUIT:
SDL_Quit();
exit(0);
break;
default:
break;
}

閱讀全文

與怎麼解碼圖片相關的資料

熱點內容
毛曉彤錦綉未央發型圖片 瀏覽:597
word如何掃描圖片 瀏覽:939
茶杯貓咪可愛圖片 瀏覽:46
神明圖片男生 瀏覽:365
ps如何移圖片 瀏覽:592
word圖片右鍵怎麼沒另存為 瀏覽:272
化學圖片怎麼轉化成文字 瀏覽:865
男生帶玉百度圖片 瀏覽:545
男生頭像q版高清圖片 瀏覽:588
女生愛你動漫圖片 瀏覽:98
美麗的女生和帥氣的男生的圖片 瀏覽:881
蒯字男生圖片 瀏覽:322
圈暈衣服圖片 瀏覽:513
動態美女搞笑圖片大全 瀏覽:174
簡單信封圖片 瀏覽:147
古裝人物繪畫簡單圖片 瀏覽:702
徐州美女新娘圖片 瀏覽:494
駱駝毛的衣服圖片 瀏覽:746
最美夕陽下的女生圖片 瀏覽:191
各個國家的衣服圖片 瀏覽:736