Tag Archives: Fl_RGB_Image

Writing RGB or GREY buffer into a JPEG file

      Comments Off on Writing RGB or GREY buffer into a JPEG file

Import issue: This example code is for Linux ( or possible for MacOSX ). and .. Fixed some wrong code Makefile It must be declared to link with jpeg library in system, or it should not be switched with turbo-jpeg. LFLAGS += -ljpeg Code for jpeglib. #include <jpeglib.h> int writejpeg(… Read more »

FLTK tech, HICON to Fl_RGB_Image

      Comments Off on FLTK tech, HICON to Fl_RGB_Image

This is a simple source code for converting Windows HICON to Fl_RGB_Image for my own customized FLTK window. Before understanding how it works, It must be requires understanding of some Windows API like LoadImage(). API, icon_to_flrgb() Fl_RGB_Image* icon_to_flrgb(HICON hIcon) { BITMAP bm; ICONINFO iconInfo; GetIconInfo(hIcon, &iconInfo); GetObject(iconInfo.hbmColor, sizeof(BITMAP),&bm); int width… Read more »