views:

140

answers:

1

I have a photoshop plugin for a file format Ive written in c++ that loads and opens the images, however I do not have code to save the image in the same format

Using SimpleFormat sample plugin as a base I have the following code:

 FormatFlags { fmtSavesImageResources, 
               fmtCanRead, 
               fmtCanWrite, 
               fmtCanWriteIfRead, 
               fmtCanWriteTransparency, 
               fmtCanCreateThumbnail },

However removing fmtCanWrite or IfRead etc produces parser errors in the Pipl tool, I've checked the syntax and it should be correct but I cannot figure out how to do this =s

A: 

This is really counter-intuitive but if you check out pg 77 of Plug-in Resource Guide.pdf from the SDK the flags aren't really flags, they are actually keywords. Based on the grammar they give, to not include the write flag you actually need to replace it with a do-not-write flag.

For example, this compiles fine for me:

 FormatFlags { fmtDoesNotSavesImageResources, 
               fmtCanRead, 
      fmtCannotWrite, 
      fmtCanWriteIfRead, 
      fmtCanWriteTransparency, 
      fmtCanCreateThumbnail }
Lucas