Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#95 Wrong jpg size returned by ilSaveL

closed-fixed
nobody
None
5
2006-04-24
2006-03-12
Massimo Cora'
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

  • 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;
    }

     
  • Dario Meloni
    Dario Meloni
    2006-04-24

    • status: open --> closed-fixed
     
  • Logged In: NO

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