mrRay / vvopensource

OSC and MIDI frameworks for OS X and iOS, a framework for managing and rendering to GL textures in OS X, and a functional ISF (interactive shader format) implementation for OS X.
232 stars 33 forks source link

Images with DPI > 72 #20

Closed pixlwave closed 8 years ago

pixlwave commented 8 years ago

I'm not sure if this is intentional behaviour, but when calling VVBufferPool.globalVVBufferPool().allocBufferForNSImage(myImage) if the image passed in is higher in DPI than 72, the returned buffer is lower resolution than the original.

Try loading the following image into ISF Editor, and you will see what I mean. 512

Many thanks for the great frameworks :)

pixlwave commented 8 years ago

Just an update, I'm currently working around this by calling CGImageForProposedRect:context:hints: on NSImage and then creating the buffer with allocBufferForCGImageRef: instead, which is returning the correct sized buffer.

mrRay commented 8 years ago

i don't remember if it's the intentional behavior, but it sure seems like a bug right now- thanks for reporting this, commit 9a4789b79dae029b6fbd4f4625b3d331548ed499 should address it!

pixlwave commented 8 years ago

Fab, that's done the trick :)