Menu

GIF to BMP image damage

Developers
cavanus
2005-08-02
2012-10-31
  • cavanus

    cavanus - 2005-08-02

    Hello,

    I'm using FreeImage 3.7.0 DLL with Borland C++ Bulider 6.0.

    My test steps:
    1 - Create red.gif in MS Paint: (1024 x 768 px) filled with red color;
    2 - img = FreeImage_Load(FIF_GIF, "red.gif");
    3 - FreeImage_Save(FIF_BMP, img, "red.bmp");
    4 - red.bmp is crazy!!!

    Test files:
    http://intranet.taotronics.com.br:8001/red.gif
    http://intranet.taotronics.com.br:8001/red.bmp

    Any idea?

     
    • cavanus

      cavanus - 2005-08-06

      New tests:

      1 - Saving the image in other formats:
      FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
      if (img) {
      FreeImage_Save(FIF_BMP, img, "red.bmp");
      FreeImage_Save(FIF_JPEG, img, "red.jpg");
      FreeImage_Save(FIF_PNG, img, "red.png");
      FreeImage_Unload(img);
      }
      All generated images are damaged...

      2 - Create an BMP red image and saving as GIF:
      red.gif is ok!

      3 - Loading red.gif (generated with FreeImage) an saving in others formats:
      FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
      if (img) {
      FreeImage_Save(FIF_BMP, img, "red.bmp");
      FreeImage_Save(FIF_JPEG, img, "red.jpg");
      FreeImage_Save(FIF_PNG, img, "red.png");
      FreeImage_Unload(img);
      }
      Same result of test 1...

       
    • Hervé Drolon

      Hervé Drolon - 2005-08-05

      I've tested the loading of your GIF file and the saving to BMP (with default options) and it works OK for me ...
      Herv

       
    • Floris van den Berg

      Your bmp looks as if there's something wrong with the pitch. With default options it works works fine, so my suspicion is that you do something more than just load + save.

      Floris

       
    • cavanus

      cavanus - 2005-08-06

      My test program has only these two lines...

      Which the compiler / environment that you are using?

       

Log in to post a comment.

MongoDB Logo MongoDB