• 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 invalidate an image window after "save as" in format plug-in

New Here ,
Aug 05, 2010 Aug 05, 2010

Copy link to clipboard

Copied

After finishing Write sequence in format plug-in I need to force host to read the file again or read file and then invalidate the image in the window.

saved image can be different from the source. how can I do it?

I really appreciate any advices.

Cheers.

TOPICS
SDK

Views

987

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

correct answers 1 Correct answer

Contributor , Aug 06, 2010 Aug 06, 2010

Same for GIF and others (you do get the preview option though). I believe this is the general modus operandi of Photoshop - as far as  they key features of the file, such as layers, channels, color mode etc  can be maintained by the destination format, you can 'Save As' the file  however your in-memory document will not be a true represenation of your  file on the disk until explicitly closed and re-open. I'm not sure that breaking this paradigm just for your specific format would worth the effo

...

Votes

Translate

Translate
Adobe
Contributor ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

I'm personally unaware about any build-in functions that would allow you  to do exactly what  you want. Of course you could come up with a fancy  export-automation-import combo that upon save would send a notification  to your automation that would, say, prompt the user, and then close the  current document and re-open the saved one, however its probably not  what you'd like to do. I'm actually wondering whether the approach you  are trying to implement is the best way to deal with the problem. In  case  the saved file is so different from the current one that it must be  re-read to properly reflect the changes, may be its better to have 'Save as' option disabled altogether and force 'Save as copy' instead.  This approach is usually used when certain features or properties of the  current document cannot be maintained  in the destination format (e.g. try saving either a multi-layer TIFF or  an Index color document into BMP format that doesn't support either of  these - 'Save: as a copy' on the Save dialog will be checked and  disabled), so if your case is similar to it, this would probably be the  way to go.

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Output is different as with jpeg files with different quality values.

For example, I loaded jpeg file and "save as" it with minimum "0" quality, so output is different too, but photoshop still showing me the old image. This is weird?

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
Contributor ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Same for GIF and others (you do get the preview option though). I believe this is the general modus operandi of Photoshop - as far as  they key features of the file, such as layers, channels, color mode etc  can be maintained by the destination format, you can 'Save As' the file  however your in-memory document will not be a true represenation of your  file on the disk until explicitly closed and re-open. I'm not sure that breaking this paradigm just for your specific format would worth the effort.

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Thank you. I think you are right.

BTW

in struct FormatRecord

int32 maxValue; /**< Used for read with 16-bit depth only. */

That should I use to read in 32-bit format?
Cheers

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

LATEST

Ooo I see, 32-bit format is not int32 as I thought but real32 (float) 🙂

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
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

For example, I loaded jpeg file and "save as" it with minimum "0" quality, so output is different too, but photoshop still showing me the old image. This is weird?

No, because you are editing a document (or the file you opened), not the file you just saved.

Your document remains as-is, and you can save it to multiple filenames and file types with different settings.

Only if you close the document and open one of those specific files should you see the lossy version of the image in that particular file.

Losing quality in the document with every save -- that would create more than a few angry customers.

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 ,
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

Caption after "Save As" shows just "saved as" new file name. Which tells me what I have a new file opened. And I became an angry customer.

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