• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to read and write the image data void *inData in the filter plug-in?

New Here ,
Mar 20, 2008 Mar 20, 2008

Copy link to clipboard

Copied

In the filter plug-in, void *inData in the struct FilterRecord is the pointer to the requested input image data. How to read and write it? In another word, how to translate it to unsigned char * data?
TOPICS
SDK

Views

568

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Participant ,
Mar 22, 2008 Mar 22, 2008

Copy link to clipboard

Copied

Use a cast, or assign to a pointer with your desired type.

For a large number of examples, see my source code at http://telegraphics.com.au/sw/

E.g., usage of inData in simple filters such as https://www.telegraphics.com.au/fisheye/browse/12bits/trunk/main.c?r=12#l248

You will also want to do this if you're accessing 16 bit data (unsigned short).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2008 Mar 26, 2008

Copy link to clipboard

Copied

LATEST
Thanks for you help.Could you explain it more particular?
Now my code is like this:
-------------------------------------------
FILE *fp;
fp=fopen("C:\\h.bmp","w+r");
fseek(fp, 55, SEEK_SET);
fwrite((unsigned char*)gStuff->inData, 1, gStuff->bigDocumentData-> wholeSize32.v * gStuff->bigDocumentData->wholeSize32.h * gStuff->planes, fp);
fclose(fp);

-------------------------------------------
Why the image data saved is disordered?
Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines