Re: Speeding up thumbnail generation (like multi threaded). Thoughts please.
- From: Mark <markg85 gmail com>
- To: jcupitt gmail com
- Cc: gtk-devel-list gnome org
- Subject: Re: Speeding up thumbnail generation (like multi threaded). Thoughts please.
- Date: Sun, 30 Aug 2009 21:24:06 +0200
On Sun, Aug 30, 2009 at 3:51 PM, <jcupitt gmail com> wrote:
> 2009/8/28 Mark <markg85 gmail com>:
>> static GdkPixbuf *
>> scale_pixbuf_preserve_aspect_ratio (GdkPixbuf *pixbuf,
>> gint size,
>> GdkInterpType interp)
>
> One more idea: this will be very slow for JPEGs (your use case, I think).
>
> It will decode the whole file, then shrink. libjpeg supports
> shrink-on-load where it only decompresses enough of the file to be
> able to supply pixels at a certain size. In particular, libjpeg can do
> a very quick load-at-1/8th-size read where it just decompresses enough
> to be able to get the DC component of each 8x8 block. If you use
> libjpeg like this you can expect around a 100x speedup of the
> decompress step.
>
> I have some code that does this lying around, I'll try to clean it up
> and post it next week so you can test it. Or maybe glib does this
> already? I know imagemagick uses this trick for it's thumbnailing (if
> it didn't it'd be far slower than glib, heh).
>
> John
>
Feel free to supply the code needed for that.
However in my benchmarks GraphicsMagick was a clear loser compared to
glib and to my understanding graphics magick is several times
__faster__ then imagemagick. I could be wrong.
And anyone that could try to answer the questions i have in my
previous (3!) mails? and am i doing things right now or am i messing
things up big time?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]