Menu

#95 Wrong jpg size returned by ilSaveL

closed-fixed
nobody
None
5
2006-04-24
2006-03-12
No

If I load a bitmap image, and then I try to save it on
a lump in jpeg format, openil returns me the number of
bytes of bitmap's size!
So I cannot know the new lump size, and I must check
for the jpeg's end of image... That's bad.

It happens also saving in TGA or other formats..

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I have that problem, too.
    The size returned is the lump position after last ilLoadL.

     
  • Roman Vorobets

    Roman Vorobets - 2006-04-01

    Logged In: YES
    user_id=1491880

    Index: G:/Projects/Gem_Engine/External/devil/src-IL/il_files.cpp

    ---
    G:/Projects/Gem_Engine/External/devil/src-IL/il_files.cpp
    (revision 6)
    +++
    G:/Projects/Gem_Engine/External/devil/src-IL/il_files.cpp
    (working copy)
    @@ -295,6 +295,7 @@
    WriteLump = Lump;
    WriteLumpPos = 0;
    WriteLumpSize = Size;
    + ReadLumpPos = 0;
    }

    @@ -636,6 +637,7 @@
    }

    WriteLumpPos += SizeBytes;
    + if (WriteLumpPos > ReadLumpPos) ReadLumpPos = WriteLumpPos;

    return SizeBytes;
    }

     
  • Anonymous

    Anonymous - 2006-04-24
    • status: open --> closed-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    Thanks to sesquialteral it has been fixed, the is now in CVS (not in 1.6.8RC1)

     

Log in to post a comment.