Wrong jpg size returned by ilSaveL
A full featured cross-platform image library
Brought to you by:
doomwiz
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..
Logged In: NO
I have that problem, too.
The size returned is the lump position after last ilLoadL.
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;
}
Logged In: NO
Thanks to sesquialteral it has been fixed, the is now in CVS (not in 1.6.8RC1)