I am trying to make my own simple image viewer and tried doing it with OpenGL. However, reading PNGs or JPGs with SOIL library and then creating textures with OpenGL is rather very slow. Windows Picture Viewer is very fast at quickly displaying pictures after double clicking the files. My question is: What are some alternatives or libraries or maybe OpenGL optimisations for quickly loading and displaying a picture? I am using Windows.
Asked
Active
Viewed 132 times
0
-
1Just use GDI+ - it's built-in since XP, can load [png,jpg,gif,wmf,emf,tiff and exif], it's fast and allows the production of small .exe files. Once GDI+ is started, you only need two functions to load any of the above to an HBITMAP. Have a look at **(a)** the constructors for the Bitmap class (one takes a wchar_t* filename) and **(b)** the .GetHBITMAP method of said class. See here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms534420(v=vs.85).aspx – enhzflep Apr 08 '14 at 23:57
-
Would QT gui be fine as well? – sgtHale Apr 09 '14 at 00:01
-
Can't see why not, after all - (that part of) GDI+ just loads the image file into a HBITMAP object. Surely Qt has functions that facilitate the display of HBITMAPs. – enhzflep Apr 09 '14 at 00:05