Hi there,
> But at my computer at work, I could reproduce the problem.
Thanks for taking some time to look.
> The problem should be fixed in trunk revision 1495 - will be in release
> 0.6.1.
I tried the cvs version but I had to slightly modify the code to get
it work (otherwise RawStudio would segfault whenever loading a
thumbnail). Here is my version (that gives me the desired result):
pl = gdk_pixbuf_loader_new();
while((length > 100000) && (pos < (rawfile->size-80000)))
{
gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos,
80000, NULL);
length += 80000;
pos += 80000;
}
// gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos, length,
NULL);
gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos,
rawfile->size-pos, NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf(pl);
gdk_pixbuf_loader_close(pl, NULL);
I guess replacing "length" with "rawfile->size-pos" must b0rk things
in many other cases (that's why I just commented out the original
version). Maybe something along the line of:
pl = gdk_pixbuf_loader_new();
while((length > 100000) && (pos < (rawfile->size-80000)))
{
gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos,
80000, NULL);
length += 80000;
pos += 80000;
if (pos < (rawfile->size-80000)) {
length=rawfile->size-pos;
break;
}
}
gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos, length,
NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf(pl);
gdk_pixbuf_loader_close(pl, NULL);
would do the trick (I didn't test this, though)... I am not good
enough of a coder to judge so I leave it to you, but I wanted to let
you know before you release a 0.6.1 version that crashes on thumbnails
loading (bad PR :-/ )
Take care,
Joel
--
__________________________________
photographs: http://jcornuz.awardspace.com
blog - Linux and photography: http://jcornuz.wordpress.com
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev