Skip to main content
Known Participant
October 20, 2008
Question

How to grab image?

  • October 20, 2008
  • 2 replies
  • 1515 views
Hi everyone.
I make an export plugin
I try to save image to the file.
Have a few question:
1. Is it possible to use SPActionControlSuite in export plugin? it returns error when i try to AcquireSuite..
2. In my test i try save HBITMAP from HDC from gExportRecord->displayPixels to file using CxImage. But I always have a black filled rect in file.. How can I get HBITMAP or save layer/or whole image to the file from export plugin?

wbr Dmitry
This topic has been closed for replies.

2 replies

_sax0n_Author
Known Participant
October 25, 2008
i'm using a CxImage to save and convert the images.
i didn't find in my SDK format of the buffer (exportrecord.data or PixelMemoryDesc.data. is the format same?)
as in outbound sample i thought the format is plane count of the array[x,y]. but it give me access violition when i try read the data..
Chris Cox
Legend
October 22, 2008
Why are you messing with DisplayPixels (which is only used to draw to the display)?

Just get the values from the export API and write them to your file.

Have you looked at the example export plugin?
Participant
March 19, 2012

I have the same problem, outbound sample is not the good example.

Chris Cox, can you post here an example how to export data in jpeg file or bmp or png?

Chris Cox
Legend
March 20, 2012

You already have lots of examples in the SDK.

For JPG, BMP, or PNG you should just use Photoshop to save.

For other formats, you could write a format plugin, or an export plugin.

If you know C, it should take you 10 minutes or less to modify one of the example plugins.