0

I'm having problem: I was trying to add image to my _fl_group_ but was not able to do so.

I was trying to identify where the problem occurs and according to specification on fltk's webpage, if image is opened with fl_JPEG_image(const char* path) constructor correctly, calling im->w() should return > 0 but it does not.

I don't know if I'm entering path correctly (in proper way)? I'm on win and the path to file is "e:\\zaloha\\Pictures\\my\\DSC_0242.jpg" and that is the way I typed it but after opening width is still 0 here is my code:

Fl_JPEG_Image* im = new Fl_JPEG_Image("e:\\zaloha\\Pictures\\my\\DSC_0242.jpg");
double w = im->w();
double h = im->h();
double d = im->d();
images.push_back(im);
Fl_Box* box = new Fl_Box(10,10,600,400);
box->image(im);
Pic_GR->add(box);

so as a result I have no image draw.

Ziezi
  • 6,375
  • 3
  • 39
  • 49
joasisk
  • 61
  • 1
  • 13
  • Did you build the fltkjpeg.lib or did it come as a set of libraries? If you have the fltk source, just single step into Fl_JPEG_Image and find out why it is not loading. If you can't step into Fl_JPEG_Image, ensure that you're writing out the debug symbols to a suitably named pdb file (not vxxx.pdb which is the MS default) – cup May 17 '15 at 11:12
  • the lib used is downloaded from fltk's page – joasisk May 17 '15 at 18:41

1 Answers1

0

Actually the solution is simple:

Despite using Windows you have to enter Unix style path, so instead of backward "\\" simply use "/" so the path should look like this: "e:/zaloha/Pictures/my/DSC_0242.jpg"

Ziezi
  • 6,375
  • 3
  • 39
  • 49
joasisk
  • 61
  • 1
  • 13