Programmatically Manipulate Bitmap in Photo Paint?

Is it possible to programmatically manipulate a bitmap/image/picture in Photo Paint?  In other words, read the pixels of the bitmap, do some calculations and write a new bitmap? I am trying to do a purple filter (hue=300), similar to a red, green, or blue filter. I haven't found where to get at the pixels is this beyond VBA or VSTA can do in Photo Paint?

Parents
  • I'm not seeing a way to adjust the hue with VBA in Photo Paint, but if your end goal is to alter the hue, you could try the following.

    1. Import the image into CorelDRAW.

    2. Create a rectangle the same size as the image.

    3. Set the outline to none and the fill to purple.

    4. Use the lens tool to turn the rectangle into a filter.

    5. Export as a raster image.

    The VBA code "ActiveLayer.Shapes(1).CreateLens 3, 50, CreateRGBColor(170, 0, 255)" without quotes, will change an active shape into a filter. 

    CreateLens 3 = Color Add

    CreateLens 4 = Color Limit

    CreateLens 9 = Transparency

    50 is the amount the the filter affects the image below and the RBG color would have to be adjusted to suit your needs.

    Once you figure out your settings, you should be able to create a simple macro in CorelDRAW that programmatically accomplishes steps 1-5 above.

    Hope this helps

Reply Children
No Data