1 /**********************************************\ 2 * 3 * Simple Viewer GL edition 4 * by Andrey A. Ugolnik 5 * http://www.ugolnik.info 6 * andrey@ugolnik.info 7 * 8 \**********************************************/ 9 10 #pragma once 11 12 #include "buffer.h" 13 14 #include <string> 15 #include <GLFW/glfw3.h> 16 17 struct sBitmapDescription 18 { resetsBitmapDescription19 void reset() 20 { 21 bitmap.clear(); 22 format = GL_RGB; 23 bpp = 0; 24 pitch = 0; 25 width = 0; 26 height = 0; 27 28 bppImage = 0; 29 size = -1; 30 31 images = 0; 32 current = 0; 33 34 isAnimation = false; 35 delay = 0; 36 37 exifList.clear(); 38 } 39 40 // buffer related 41 Buffer bitmap; 42 GLenum format = GL_RGB; 43 uint32_t bpp = 0; 44 uint32_t pitch = 0; 45 uint32_t width = 0; 46 uint32_t height = 0; 47 48 // file related 49 uint32_t bppImage = 0; // bit per pixel of original image 50 long size = -1; // file size on disk 51 52 uint32_t images = 0; 53 uint32_t current = 0; 54 55 bool isAnimation = false; 56 uint32_t delay = 0; // frame animation delay 57 58 struct ExifEntry 59 { 60 std::string tag; 61 std::string value; 62 }; 63 typedef std::vector<ExifEntry> ExifList; 64 ExifList exifList; 65 }; 66