26 lines
944 B
Diff
26 lines
944 B
Diff
--- libeog/eog-image.c
|
|
+++ libeog/eog-image.c
|
|
@@ -365,12 +365,20 @@
|
|
|
|
entry = exif_content_get_entry (priv->exif->ifd [EXIF_IFD_EXIF], EXIF_TAG_PIXEL_X_DIMENSION);
|
|
if (entry != NULL && (priv->width >= 0)) {
|
|
- exif_set_long (entry->data, bo, priv->width);
|
|
+ if (entry->format == EXIF_FORMAT_LONG)
|
|
+ exif_set_long (entry->data, bo, priv->width);
|
|
+ if (entry->format == EXIF_FORMAT_SHORT)
|
|
+ exif_set_short (entry->data, bo, priv->width);
|
|
+ /* other number formats should not happen */
|
|
}
|
|
|
|
entry = exif_content_get_entry (priv->exif->ifd [EXIF_IFD_EXIF], EXIF_TAG_PIXEL_Y_DIMENSION);
|
|
if (entry != NULL && (priv->height >= 0)) {
|
|
- exif_set_long (entry->data, bo, priv->height);
|
|
+ if (entry->format == EXIF_FORMAT_LONG)
|
|
+ exif_set_long (entry->data, bo, priv->height);
|
|
+ if (entry->format == EXIF_FORMAT_SHORT)
|
|
+ exif_set_short (entry->data, bo, priv->height);
|
|
+ /* other number formats should not happen */
|
|
}
|
|
}
|
|
#else
|