Open typoman opened 1 year ago
it used to be the TIFFRrepesentation but that changed here: https://github.com/typemytype/drawbot/commit/137a75e3967f78551e94146fe1be529ae1b260ba
with the commit message:
- all image rep must be build with _makeBitmapImageRep when the imageObject reads a path, when the imageObjects applies a filter
Its not perfect now, I guess the image resolution needs to be checked on open
and used while drawing into the imageObject.
Optionally the imageObject could have an imageResolution
argument during init when there is no path/image given: ImageObject(imageResolution=144)
.
I found out that if I load an image using the
ImageObject
it renders small and blurred when the image metadata dpi is 300. If I change the dpi of the image to 72 outside drawbot (without changing the number of pixels) drawbot renders it as the actual image. I found a solution by loading the image usingTIFFRepresentation
instead of the current method in the_makeBitmapImageRep
function. This method always keeps the right size regardless of the input image dpi metadata. This code sample only overrides the function_makeBitmapImageRep
to show the difference. I'm not sure what would be the other effects of this change: