Hi Sven,

Sven Neumann wrote:
> Previously the code selected scale factors that resulted in an image
> smaller or equal the desired size. Now the code select scale factors
> that create an image equal or larger than the desired size.

This was for performance and memory usage reasons esp. for big images,
but with the finer scaling granularity of libjpeg v7 & 8 it probably
doesn't make a big difference anymore. Feel free to change it if you
like :-), but see below.

> ---
>  .../idirectfbimageprovider_jpeg.c                  |   19 ++++++++++++-------
>  1 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c 
> b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c
> index 5591387..bf04e12 100644
> --- a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c
> +++ b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_jpeg.c
> @@ -463,16 +463,21 @@ IDirectFBImageProvider_JPEG_RenderTo( 
> IDirectFBImageProvider *thiz,
>            }
>            else if (rect.x == 0 && rect.y == 0) {
>  #if JPEG_LIB_VERSION >= 70
> -               cinfo.scale_num = 16;
> -               while (cinfo.scale_num > 1) {
> +            /*  The supported scaling ratios in libjpeg 7 and 8
> +             *  are N/8 with all N from 1 to 16.
> +             */
> +               cinfo.scale_num = 1;
> +               jpeg_calc_output_dimensions (&cinfo);

Is this a Thunderbird artefact, or is the indentation buggered here?



Cheers,
Andre'
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to