⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mga_view.h

📁 linux下显示各种格式图片
💻 H
字号:
//#define VERSION "0.1.4 alpha by HelDoRe"#define VERSION2 "\x1B[0;38m" VERSION " \x1B[0;0mbeta by \x1B[0;38mHelDoRe\x1B[0;0m"#include <stdio.h>#include <stdlib.h>#include <sys/ioctl.h>#include <unistd.h>#include <fcntl.h>#include <sys/mman.h>#include <inttypes.h>#include <termio.h>#include <linux/fb.h>#include "mga_vid.h"#include <config.h>#ifdef USE_X#include <X11/Xlib.h>#include <X11/Xutil.h>Display *display;//char *displayname=NULL;XVisualInfo visualinfo;int screen_nr;unsigned int resolution,bppixel;Window window;XEvent event;Colormap colormap;XTextProperty wintite;Visual *visual;XImage *image;GC gc;#endifmga_vid_config_t config;uint8_t *mga_vid_base,ori;uint32_t is_g400;#define ogr_x 7000#define ogr_y 7000char *mee,klawisz,*dest;int tx,ty,tdepth,jaka,i,j,x,y,r,g,b,image_x,image_y,depth,tempi,f,kod,dodajx,dodajy,YU12,hx,hy,zmgm,obr,dir,x_org,y_org,fullscr,toob,zoom,grey,multi,trans,iksy;float scale_x,scale_y,scale;	FILE *plik;//unsigned char tabr[2000*2000],tabg[2000*2000],tabb[2000*2000];//unsigned char tab2r[2000*2000],tab2g[2000*2000],tab2b[2000*2000];unsigned char *tabr,*tabg,*tabb;unsigned char *tab2r,*tab2g,*tab2b;uint8_t y_image[2000 * 2000];uint8_t cr_image[1000 * 1000];uint8_t cb_image[1000 * 1000];char *fb_dev_name;unsigned char *fb_mem;unsigned char *fb_mem2;int is_matrox;int fb_dev_fd;int start_zoom;struct fb_var_screeninfo fb_vinfo;struct fb_fix_screeninfo fb_fix;#define RGB2YUV_SHIFT 8#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))#define BV ((int)(-0.071*(1<<RGB2YUV_SHIFT)+0.5))#define BU ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5))#define GY ((int)( 0.504*(1<<RGB2YUV_SHIFT)+0.5))#define GV ((int)(-0.368*(1<<RGB2YUV_SHIFT)+0.5))#define GU ((int)(-0.291*(1<<RGB2YUV_SHIFT)+0.5))#define RY ((int)( 0.257*(1<<RGB2YUV_SHIFT)+0.5))#define RV ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5))#define RU ((int)(-0.148*(1<<RGB2YUV_SHIFT)+0.5))#define fgetc32(f) (fgetc(f)<<24) | (fgetc(f)<<16) | (fgetc(f)<<8) | fgetc(f)#define fgetc16(f) (fgetc(f)<<8) | fgetc(f)#define fgetc32b(f)  fgetc(f) | (fgetc(f)<<8) | (fgetc(f)<<16) | (fgetc(f)<<24)#define fgetc16b(f)  fgetc(f) | (fgetc(f)<<8)int check_image(int ix,int iy,int id);void rotate_img();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -