(gilbertt)
Actually, made the gif loader give back what it's got without changing im->h
to reflect, or reallocing the image data. The reason for this is that it
already told apps what the image size was in the first progressive loader
callback, and changing it afterwards can cause confusion. Also, an app can
still handle/display a half-loaded image, as the rest is just filled black,
and the programmer knows how much of the image he got, 'cos he interrupted
it from the callback. If the programmer wants to trim the image, he knows
where to trim it, but if he/she wants to display a part-loaded image,
that'll work sanely.
I think this is more sane behaviour, having tested it in feh and
imlib2_view, but feel free to disagree ;-)
SVN revision: 2561
(gilbertt)
All done except the tiff loader. (Although I may be giving back incomplete
rows on a couple, I have to test more).
The tiff loader is gonna be hard, libtiff is quite broken in many ways ;-)
SVN revision: 2549
(gilbertt)
Okay, an ImlibProgressFunction now return int, not void. The idea of this is
so that a progressive load may be aborted midway, simply by returning 0 from
the progress callback. There are a number of reasons for wanting this.
This is a slight breakage to people currently using progressive loading -
you'll have to change your definition to int, and return 1 to get normal
behaviour again. As far as I know, only feh and imlib2_view uses progressive
loading, and I'll sort those two out. To anyone else, sorry, but it's not
released yet, what did you expect? ;-)
Notice. I haven't changed the loaders yet, so returning 0 won't do squat
until tomorrow, when I change them all. What they will do is clean up and
return what they've got so far. If anyone who wrote a loader wants to do
their own, cool, it'll save me learning the api of every damn image lib ;-)
It's just a case of swapping
progress(params, ...);
with
if(!progress(params, ...)
cleanup_some_stuff_and_return_what_there_is();
Otherwise, I'll do it myself tomorrow.
Can anyone tell I've got time off work? ;-)
SVN revision: 2544
(gilbertt)
Changed all the loaders to use ImlibProgressFunction instead of defining it
themselves. This is so I can change them all at once tomorrow.
SVN revision: 2542