Plugin support for drawing scaled images

Is there any way to control how an image is drawn with a viewer plugin besides just passing a HBITMAP of the loaded image to DO to do all the draw calls itself?

Specifically, I was looking to see if it's possible to draw typical image types (.jpg, .png) via GDI+ to have better quality when scaling/zooming the image.

I don't have prior experience writing plugins, but I am able to get a simple one to build and register in DO with DVP_IdentifyW. I looked for existing available plugin source code (like JPEG XL) and the SDK as references, but I didn't see anything that handles actually drawing.

Can you tell me:
1. Is it possible?

2. Or, is there already an existing plugin that handles scaled rendering for .jpg and .png with ok quality? I tried the Universal Graphics Viewer plugin after configuring it to use the target file types, but the images rendered with the same poor quality scaling.

I absolutely love DO for my image workflows and in general, it's just scaling quality that's a perpetual spoiler.

Thanks!

Plugins can render their entire window if they want to. The animated gif plugin is an example with source code.

Thanks for pointing that out. Looks like I had downloaded the wrong archive from the page for that previously - checked again and realized my mistake.

This is a great example to learn from, although definitely more involved than I had naively imagined!

The Text plugin has a more simple example of how to make a viewer with its own window. (Doesn’t draw any images of course.)

1 Like