[gnome-photos/wip/rishi/buffer-decoder: 15/16] jpeg
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/buffer-decoder: 15/16] jpeg
- Date: Wed, 12 Sep 2018 11:55:31 +0000 (UTC)
commit e1290bb492a330a4f5a1ba4b9118a47373a4197d
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Sep 7 07:58:52 2018 +0200
jpeg
src/photos-gegl-buffer-codec-jpeg.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-gegl-buffer-codec-jpeg.c b/src/photos-gegl-buffer-codec-jpeg.c
index 24f1ab0b..8e9b83d1 100644
--- a/src/photos-gegl-buffer-codec-jpeg.c
+++ b/src/photos-gegl-buffer-codec-jpeg.c
@@ -604,6 +604,8 @@ photos_gegl_buffer_codec_jpeg_load_increment (PhotosGeglBufferCodec *codec,
JDIMENSION height;
JDIMENSION width;
g_autofree JOCTET *icc_profile = NULL;
+ gdouble target_height;
+ gdouble target_width;
gint format_components;
gint rc;
guint icc_profile_len;
@@ -628,8 +630,8 @@ photos_gegl_buffer_codec_jpeg_load_increment (PhotosGeglBufferCodec *codec,
g_signal_emit_by_name (self, "size-prepared", (guint) width, (guint) height);
self->can_set_size = FALSE;
- height = photos_gegl_buffer_codec_get_height (PHOTOS_GEGL_BUFFER_CODEC (self));
- width = photos_gegl_buffer_codec_get_width (PHOTOS_GEGL_BUFFER_CODEC (self));
+ target_height = photos_gegl_buffer_codec_get_height (PHOTOS_GEGL_BUFFER_CODEC (self));
+ target_width = photos_gegl_buffer_codec_get_width (PHOTOS_GEGL_BUFFER_CODEC (self));
if (height == 0 || width == 0)
{
g_set_error_literal (error, PHOTOS_ERROR, 0, _("Transformed JPEG has zero width or height"));
@@ -637,6 +639,9 @@ photos_gegl_buffer_codec_jpeg_load_increment (PhotosGeglBufferCodec *codec,
goto out;
}
+ g_message ("original size: %u, %u", (guint) self->cinfo.image_height, (guint)
self->cinfo.image_width);
+ g_message ("scaled size: %u, %u", (guint) height, (guint) width);
+
self->cinfo.scale_num = 1;
for (self->cinfo.scale_denom = 2; self->cinfo.scale_denom <= 8; self->cinfo.scale_denom *= 2)
{
@@ -691,6 +696,7 @@ photos_gegl_buffer_codec_jpeg_load_increment (PhotosGeglBufferCodec *codec,
self->zoom_from_mipmap_x = (gdouble) width / (gdouble) self->cinfo.output_width;
self->zoom_from_mipmap_y = (gdouble) height / (gdouble) self->cinfo.output_height;
+ g_message ("zoom_from_mipmap: %f, %f", self->zoom_from_mipmap_x, self->zoom_from_mipmap_y);
self->mipmap_height_needed_for_zoom = (gint) ((gdouble) self->tile_height
* (gdouble) self->cinfo.output_height
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]