mirror of https://github.com/GNOME/gimp.git
only set the resolution if X_density and Y_density are not zero. Otherwise
2007-12-02 Sven Neumann <sven@gimp.org> * plug-ins/jpeg/jpeg-load.c (jpeg_load_resolution): only set the resolution if X_density and Y_density are not zero. Otherwise the default resolution would be used anyway and the user sees an annoying and confusion warning. svn path=/trunk/; revision=24251
This commit is contained in:
parent
9a39bc03a9
commit
fcbc8eda42
|
@ -1,3 +1,10 @@
|
|||
2007-12-02 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/jpeg/jpeg-load.c (jpeg_load_resolution): only set the
|
||||
resolution if X_density and Y_density are not zero. Otherwise the
|
||||
default resolution would be used anyway and the user sees an
|
||||
annoying and confusion warning.
|
||||
|
||||
2007-12-01 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpviewable.h: changed GIMP_VIEWABLE_PRIORITY_IDLE to
|
||||
|
|
|
@ -478,7 +478,7 @@ static void
|
|||
jpeg_load_resolution (gint32 image_ID,
|
||||
struct jpeg_decompress_struct *cinfo)
|
||||
{
|
||||
if (cinfo->saw_JFIF_marker)
|
||||
if (cinfo->saw_JFIF_marker && cinfo->X_density != 0 && cinfo->Y_density != 0)
|
||||
{
|
||||
gdouble xresolution = cinfo->X_density;
|
||||
gdouble yresolution = cinfo->Y_density;
|
||||
|
@ -489,10 +489,10 @@ jpeg_load_resolution (gint32 image_ID,
|
|||
case 0: /* unknown -> set the aspect ratio but use the default
|
||||
* image resolution
|
||||
*/
|
||||
if (cinfo->Y_density != 0)
|
||||
asymmetry = xresolution / yresolution;
|
||||
asymmetry = xresolution / yresolution;
|
||||
|
||||
gimp_image_get_resolution (image_ID, &xresolution, &yresolution);
|
||||
|
||||
xresolution *= asymmetry;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue