ok, fix for the ascii ppm formats. They seemed to have the same problem.

This should be it now, provided the save in ppm format works as expected
which it seems to do from geist at least.


SVN revision: 4088
This commit is contained in:
Till Adam 2001-01-03 21:42:10 +00:00
parent 81a9725218
commit 19e4e109ee
1 changed files with 28 additions and 12 deletions

View File

@ -193,10 +193,15 @@ load(ImlibImage * im, ImlibProgressFunction progress,
per = (char) ((100 * y) / im->h);
if (((per - pper) >= progress_granularity)
|| (y == (im->h - 1)))
{
{
l = y - pl;
if (!progress(im, per, 0, (y - l), im->w, l))
{
/* fix off by one in case of the last line */
if (y == (im->h -1))
l++;
if (!progress(im, per, 0, pl, im->w, l))
{
fclose(f);
return 2;
}
@ -276,11 +281,17 @@ load(ImlibImage * im, ImlibProgressFunction progress,
per = (char) ((100 * y) / im->h);
if (((per - pper) >= progress_granularity)
|| (y == (im->h - 1)))
{
l = y - pl;
if (!progress(im, per, 0, (y - l), im->w, l))
{
if (idata)
{
l = y - pl;
/* fix off by one in case of the last line */
if (y == (im->h -1))
l++;
if (!progress(im, per, 0, pl, im->w, l))
{
if (idata)
free(idata);
fclose(f);
return 2;
@ -363,10 +374,15 @@ load(ImlibImage * im, ImlibProgressFunction progress,
per = (char) ((100 * y) / im->h);
if (((per - pper) >= progress_granularity)
|| (y == (im->h - 1)))
{
l = y - pl;
if (!progress(im, per, 0, (y - l), im->w, l))
{
{
l = y - pl;
/* fix off by one in case of the last line */
if (y == (im->h -1))
l++;
if (!progress(im, per, 0, pl, im->w, l))
{
if (idata)
free(idata);
fclose(f);