Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2010-07-20 Sebastien Pouliot <sebastien@ximian.com>

	* image.c: Use DPI from source image when creating a Graphics
	instance from it. Fix bug #556181


svn path=/trunk/libgdiplus/; revision=160638
  • Loading branch information...
commit d1b757ca91d0c07c0bcc97adb93658562a62b862 1 parent 6004a8e
Sebastien Pouliot authored
Showing with 7 additions and 1 deletion.
  1. +5 −0 src/ChangeLog
  2. +2 −1  src/image.c
View
5 src/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-20 Sebastien Pouliot <sebastien@ximian.com>
+
+ * image.c: Use DPI from source image when creating a Graphics
+ instance from it. Fix bug #556181
+
2010-07-14 Sebastien Pouliot <sebastien@ximian.com>
* lineargradientbrush.c: Do not accept empty (width/height)
View
3  src/image.c
@@ -313,7 +313,8 @@ GdipGetImageGraphicsContext (GpImage *image, GpGraphics **graphics)
image->active_bitmap->width, image->active_bitmap->height, image->active_bitmap->stride);
gfx = gdip_graphics_new (surface);
- gfx->dpi_x = gfx->dpi_y = gdip_get_display_dpi ();
+ gfx->dpi_x = image->active_bitmap->dpi_horz <= 0 ? gdip_get_display_dpi () : image->active_bitmap->dpi_horz;
+ gfx->dpi_y = image->active_bitmap->dpi_vert <= 0 ? gdip_get_display_dpi () : image->active_bitmap->dpi_vert;
cairo_surface_destroy (surface);
gfx->image = image;
Please sign in to comment.
Something went wrong with that request. Please try again.