Set correct resolution in GIMP image.
[toast/gimp_passport.git] / gimp_passport_plugin.py
index c677523..d77306f 100755 (executable)
@@ -35,6 +35,7 @@ def create_passport(image, drawable, paper_width_mm, paper_height_mm, margin_mm,
     image_new.add_layer(layer)
     rgn = layer.get_pixel_rgn(0, 0, layer.width, layer.height, True)
     rgn[:, :] = pil_paper.tobytes()
+    pdb.gimp_image_set_resolution(image_new, *pil_paper.info['dpi'])
     gimp.Display(image_new)
     return image_new