Filter -> External Programs

Here everybody can post his problems with PhotoLine
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Filter -> External Programs

Beitrag von MikeFromMesa »

As I have been easing into PL from Photoshop I have found it (PL) to have some amazing functionality and some of it has been a bit of a puzzle to me so I have been reading the manual and posting questions on this forum. Here is another one.

One of the things I have found most surprising in PL is its ability to interface with external applications. On my Mac I have set up all external apps so that PL sends a tiff and to reduce all layers prior to sending and all of the apps open up with the new image. I can modify it and save it and the image updates in PL as though I was calling a plugin. This is simply amazing and unlike any other app I have tried. I have been able to successfully use this with many apps - OnOne's suite 8, Dxo's ViewPoint 2, Photo Ninja, Photoshop CC and some others.

But for some reason I have not had any success with Photoshop Elements. With that, when I save the temporary tiff file and exit, PL does a "reload" but nothing in the image changes. I have been trying to puzzle out what is going on here, but without success.

My assumptions are the following: PL, when calling an external app, creates a temporary tiff file somewhere deep in a special folder system and passes that to the app being called. It then sits and watches for an update of that temporary file and, when it finds it, it reloads that file. Those are all assumptions but I believe something like that must be happening. Assuming that is the case what could possibly be the reason that it does not work when I save the file from Elements? Nothing I can see should be preventing this from working. Photoshop CC works properly as an external app and the options I use for saving the TIFF file from Elements match those of Photoshop CC exactly. The file updates, but nothing changes in PL. I have tried this saving the image from Elements in both 8 and 16 bit formats. It makes no difference. PL simply does not update with the new image from the temporary file. I have even drilled down to the temp file to make sure that Elements is actually updating it and it is. And I can see PL doing the "reload" after saving it in Elements. But it never loads the updated image.

I just hate not knowing why something is failing. Does anyone have any ideas that might be helpful?

=========================

I believe I might have this figured out. Not solved, but perhaps I have figured out what is going on. Sometimes being forced to explain a problem is enough to lay the facts out clearly in my mind and lead me to a possible cause.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Filter -> External Programs

Beitrag von Alan9940 »

Hello Mike,

First, I fully admit I have no clue!

That first thought I had was that you might be looking at a bit depth discrepancy, but it looks like you tried it both ways and it still doesn't work. Btw, I didn't know that Elements could now process 16-bit files...when did that change? Anyway, stupid question...but you're passing a flattened version back to PL, yes? Or, are you telling me that this handshaking can happen with full layered files? The absolute only other thing I can think of is that in my deep dark digital past I've had issues with TIFF files; in other words, a TIFF out of one program ain't necessarily a readable TIFF by some other program. In the past, I've had issues with file headers and such. That's probably a very far flung possibility, and I don't know how you would verify TIFF construction out of Elements, but thought I'd mention it anyway.

Good luck!

Best regards,
AlanH
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

MikeFromMesa hat geschrieben: My assumptions are the following: PL, when calling an external app, creates a temporary tiff file somewhere deep in a special folder system and passes that to the app being called. It then sits and watches for an update of that temporary file and, when it finds it, it reloads that file.
You're exactly right. Here on Win7, PL creates a temporary TIF image in the system Temp directory and passes the fully-qualified path name of that file to the external program.

What's probably happening with PSE is the same problem I have with a couple of other programs -- when they open the file, they are not using the file's directory when doing a simple "Save". So, I have to use "Save As" and then browse to the Temp directory to choose the PL temp file. I answer "Yes" to the prompt about overwriting the existing file, and then the round-trip works as expected.

When you say that PSE is updating the temp file, you need to make sure that the temp file it's updating is the temp file that PL passed to PSE and is expecting to be updated.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Filter -> External Programs

Beitrag von MikeFromMesa »

Alan, Ken,

Thanks for your replies. Let me first answer your comments:

> Alan: Btw, I didn't know that Elements could now process 16-bit files...when did that change?

Elements can open and process 16 bit files, but it only does layers in 8 bits. Don't know when that changed, but that means that if you open a 16 bit file and stay away from layers, you can do most of what you want in 16 bits. However some things that are really convenient, like setting a horizon, requires that an image be 8 bits, as does all layers work. Silly restriction, but perhaps they are trying to keep the Photoshop customers. Don't know.

> Alan: but you're passing a flattened version back to PL, yes?

Yes, but I am not sure why that should be important. PL ought to be able to open a layered file from PS. Something I need to check with CC before it goes away ...

>Alan: I don't know how you would verify TIFF construction out of Elements, but thought I'd mention it anyway.

I have copied the Elements tif file to an accessible location and loaded it into PL so that is not the issue.

> Ken: So, I have to use "Save As" and then browse to the Temp directory to choose the PL temp file. I answer "Yes" to the prompt about overwriting the existing file, and then the round-trip works as expected.

Interesting idea, but Elements knows where the temp folder is and is trying to save it in the proper folder. I have tried both Save and Save As and neither works although PS CC works.

I am uncertain at this point precisely what the problem is, but here is what I suspect. PL creates a temp file with a path /private/.../tmp-yada-yada-yada.TIFF and passes this to Elements. This is the file name I see when the file is open in Elements but, when I try to save the file, using either Save or Save As, Elements appears to be saving the file as tmp-yada-yada-yada.tif, not tmp-yada-yada-yada.TIFF. My guess is that the difference in the suffixes between .tif and .TIFF is causing PL to fail to pick up the newly saved file. Not the capital/not capital difference, but the difference between tif and tiff which I believe are seen as different files. I am not certain and need to check that further, but that is my current working hypothesis.

I have tried repeatedly to force Elements to use the TIFF suffix by manually entering it in the Save and Save As dialog windows, but to no avail. When I look at the temp folder I see only the .tif suffix. This is odd because Elements tells me it is overwriting the source file when I save, but it changes the suffix to .tif. Don't know what I can do to solve this issue and, of course, perhaps I am wrong about what is causing it.

What I can say is that when I change the suffix from tif to TIFF in CC (in the Save/Save As dialog box) PL picks up the file and checking the temp folder shows a .TIFF file. When I do the same thing in Elements PL does not pick up the file and checking the temp folder shows a .tif file. Go figure ...
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

MikeFromMesa hat geschrieben: My guess is that the difference in the suffixes between .tif and .TIFF is causing PL to fail to pick up the newly saved file.
That would be my guess, also.

Pending a response from the developers, my only other though is that PSE is saving its changes to its own temp file or entirely in memory (and merely marking the original file as "changed") before ultimately overwriting the temp file passed to it. If you save the file in PSE, and then exit PSE, does the image update in PL?
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Filter -> External Programs

Beitrag von MikeFromMesa »

photoken hat geschrieben: If you save the file in PSE, and then exit PSE, does the image update in PL?
What happens is that the PL display box opens indicating that PL is reloading the file and the Undo list shows the External Editor as having been called. But the update does not change the image so it is reloading the original file it wrote when Elements was called.

I have satisfied myself, at least for the moment, that this is the problem. I ran a sequence and, when the file was changed in Elements, I wrote it to a different file in the temp folder. Then, when Elements was closed, I navigated to the temp folder, removed the original tiff file created by PL and renamed the new one, created by Elements, to the name of the original file, including changing the suffix to TIFF.

As soon as I did that PL reloaded the file and displayed the changes. That is good enough for me, at least for the moment. I will think about what, if anything, I can do to change the way Elements creates the output, but my guess is there is nothing I can do (short of writing a small Mac app to automatically change the name from what it is to what it should be and automatically run that when Elements closes). That is too bad because Elements, as limited as it is, has some good points. One is that it has a very good content-aware fill (as good as PS CC, in my view) and a second is that the selection tools, although a bit limited, are also pretty good.

Still, PL is a better overall editor and you were right to point that out in that forum thread. Thanks.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

Hi Mike,
Sounds like you've pretty much found out what the problem is.
MikeFromMesa hat geschrieben:it has a very good content-aware fill
One thing I remember is that PSE had three options for its content-aware fill. One of them was something like "Pattern" (or maybe it was called "Texture") which did a better job when the surrounding area was a uniform texture such as sandstone.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Filter -> External Programs

Beitrag von MikeFromMesa »

photoken hat geschrieben: One thing I remember is that PSE had three options for its content-aware fill. One of them was something like "Pattern" (or maybe it was called "Texture") which did a better job when the surrounding area was a uniform texture such as sandstone.
Where are those settings? If I rotate an image and select the remove brush the only thing I see in the Tool Settings dialog box is a single Retry button. Those settings must be hidden somewhere in one of the pulldowns. I looked at Effects (which seems like a logical place), but found nothing that looks like it would affect how the replace is done.
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Filter -> External Programs

Beitrag von Alan9940 »

MikeFromMesa hat geschrieben: Elements can open and process 16 bit files, but it only does layers in 8 bits. Don't know when that changed, but that means that if you open a 16 bit file and stay away from layers, you can do most of what you want in 16 bits.
Oh, so it really hasn't changed. Elements could always open (at least back to v7) 16-bit files...you just couldn't do much with 'em. Since I've always worked with 16-bit files and follow a layered based workflow, Elements didn't work for me.
MikeFromMesa hat geschrieben: Yes, but I am not sure why that should be important. PL ought to be able to open a layered file from PS. Something I need to check with CC before it goes away ...
It's a compatibility thing...sure, PL can probably open any layered PSD file, but if you have layers created (I'm thinking smart objects here) using filters, etc, that only CC understands, then what use are the layers in PL? Sure, you can open and look at it, but what can you do with it? This concept is the same warning Adobe and others gave about migrating back to CS6 from CC because you may have done things in CC that CS6 won't understand.

Regarding your passing files issue, my vote is that you're definitely on to something with the file extension thing. Now that you've brought this up, I remember many years ago having a very similar issue with TIFF files and extensions. Though a TIF may, technically, be identical to a TIFF I can assure you that programmatically the extension is IMPORTANT! I hope that by now you've resolved all this, anyway.

Best regards,
AlanH
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Filter -> External Programs

Beitrag von MikeFromMesa »

Alan9940 hat geschrieben: Though a TIF may, technically, be identical to a TIFF I can assure you that programmatically the extension is IMPORTANT!
Oh, yeah!

If I was working on a Windows system I would just write a service to sit and watch the temp folder and, when a .tif file was created, I would just change it to .tiff and the problem would disappear. But I am working on a Mac and I have never done much software development on a Mac. And most of what I have done was done in Java, not objective-c so I would have to do some reading before I could figure out how to write a Mac service.

What I may do instead is just write a small scripting program that will pick up the file name and call an app to change the extension when the file is saved. I will see. It will probably make some difference how much trouble this is without it. And, of course, I don't know the Elements scripting interface so I would have to figure out how to get the path automatically from Elements when I do the Save or Save As.

It all just seems like an unnecessary pain. On the other hand, what else do I have to do?
Alan9940
Mitglied
Beiträge: 297
Registriert: Mo 15 Sep 2014 01:27

Re: Filter -> External Programs

Beitrag von Alan9940 »

MikeFromMesa hat geschrieben: It all just seems like an unnecessary pain. On the other hand, what else do I have to do?
Um, make meaningful photographs? :D :D :D

But, seriously... I spent 38 years of my adult life in the IT industry (mostly on mainframes and slightly smaller platforms) doing all manner of different jobs; been using PCs or Macs since about 1982. And, yet, I really dislike sitting in front of my computer editing images when I could be out and about in the world enjoying all what it has to offer! That's probably why I recently returned to shooting more film...toss the film on a lightbox, ooh & aah, and then go shoot some more! :)

Best regards,
AlanH
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

MikeFromMesa hat geschrieben:
photoken hat geschrieben: One thing I remember is that PSE had three options for its content-aware fill. One of them was something like "Pattern" (or maybe it was called "Texture") which did a better job when the surrounding area was a uniform texture such as sandstone.
Where are those settings? If I rotate an image and select the remove brush the only thing I see in the Tool Settings dialog box is a single Retry button. Those settings must be hidden somewhere in one of the pulldowns. I looked at Effects (which seems like a logical place), but found nothing that looks like it would affect how the replace is done.
What I remember was from when I was using PSE10. In the tool options bar (sorry, don't remember which tool it was) there was the Content-aware Fill option which had three checkboxes to choose which fill method to use.
Zuletzt geändert von photoken am So 14 Dez 2014 00:37, insgesamt 1-mal geändert.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

MikeFromMesa hat geschrieben: I don't know the Elements scripting interface so I would have to figure out how to get the path automatically from Elements when I do the Save or Save As.
If you have Photoshop installed, you've got a copy of the Adobe ExtendScript Toolkit which contains their excellent little scripting program. From within that program, you can browse the Photoshop object model and get descriptions of the function names and their allowable parameters. Just about all of the functions will also work when run against PSE.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Filter -> External Programs

Beitrag von photoken »

Alan9940 hat geschrieben:I spent 38 years of my adult life in the IT industry (mostly on mainframes and slightly smaller platforms
Don't tell me that you're an old OS/2 hand. Excellent! :D
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
MikeFromMesa
Mitglied
Beiträge: 261
Registriert: Sa 22 Nov 2014 16:07

Re: Filter -> External Programs

Beitrag von MikeFromMesa »

photoken hat geschrieben: If you have Photoshop installed, you've got a copy of the Adobe ExtendScript Toolkit which contains their excellent little scripting program. From within that program, you can browse the Photoshop object model and get descriptions of the function names and their allowable parameters. Just about all of the functions will also work when run against PSE.
Well, there you go.

I am in the middle of doing a small objective-c app that will look for new entries in the temp folder and, when told, will change the suffix to allow PL to reload the file.

One of the things that seems strange to me is that when I Save (or Save As) in Elements I am told that the file already exists. So it sees filename.TIFF, tells me it is going to overwrite filename.TIFF and then creates filename.TIF so I end up having both files after the "overwrite". Very strange. This apparently has been its functionality for years and no one at Adobe has bothered to fix the problem. We could never have gotten away with that where I wrote software.

I have CC for another 18 days so I will have to hop on that pretty quickly. Of course I also have CS5.1 in the Windows VM so perhaps I could also use that to create a script. That would make the whole thing a lot cleaner.