G'MIC improved layer support request

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
User avatar
Herbert123
Mitglied
Posts: 2018
Joined: Sat 12 May 2012 21:38

G'MIC improved layer support request

Post by Herbert123 »

G'MIC is available as a PhotoLine compatible plugin - PhotoLine is even listed on the G'MIC home page as a compatible host app.

The only issue that keeps coming up is that PhotoLine does not accept layers that are generated by G'MIC and instead opens a file dialog that asks the user to locate a folder where to save the result.

For example, the Tiles to Layers filter results in the tiles being saved in a folder instead of these added as layers in the PhotoLine's layer stack.

Even something like the Ministeck filter pops up that file dialog instead of just creating a new layer.

Would it be possible to improve PhotoLine's support for G'MIC?
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
Martin Huber
Entwickler
Entwickler
Posts: 3950
Joined: Tue 19 Nov 2002 15:49

Re: G'MIC improved layer support request

Post by Martin Huber »

The github page of the plugin says:
G'MIC effects that produce multiple images or resize the image will save the results to external files, these files will have to be manually imported into Photoshop.
So if I understand that correctly, there is no way to automatically create new layers.

Martin
User avatar
Herbert123
Mitglied
Posts: 2018
Joined: Sat 12 May 2012 21:38

Re: G'MIC improved layer support request

Post by Herbert123 »

Correct, a filter like Taquin produces randomized tiles. In a host like Krita the result replaces the layer content, but in PhotoLine it asks for a location to save the result in.

I was just wondering if this is fixable or not? Some filters work, other do not. In cases such as the Tiles to Layers filter the result is many individual files saved in the folder, while it should cut up the layer into individual pieces that are placed as new layers.

But I am unsure if it is possible at all to implement this...
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4001
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: G'MIC improved layer support request

Post by Gerhard Huber »

Herbert123 wrote: Sat 25 Jun 2022 10:02 Correct, a filter like Taquin produces randomized tiles. In a host like Krita the result replaces the layer content, but in PhotoLine it asks for a location to save the result in.
I didn't test it in Krita until now, but I had a look on the source code of Gmic Plugin, Read.cpp:

Code: Select all

                bool imageSizeMatchesDocument = ImageSizeMatchesDocument(filePath, documentSize);

                if (imageSizeMatchesDocument)
                {
                    CopyImageToActiveLayer(filePath, filterRecord);
                }
                else
                {
                    boost::filesystem::path outputFilePath;

                    OSErrException::ThrowIfError(GetResizedImageOutputPath(
                        filterRecord,
                        settings,
                        parameters.PrependGmicCommandName(filePath.filename()).replace_extension(outputFileExtension),
                        outputFilePath));

                    ConvertGmic8bfImageToPng(filterRecord, filePath, outputFilePath);
                }
This means, when the size of the new image is not the same as the source size, Gmic will always ask for a PNG to save.
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4001
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: G'MIC improved layer support request

Post by Gerhard Huber »

I think Krita has no Photoshop plugin interface (8bf). So it is no reference.
User avatar
Herbert123
Mitglied
Posts: 2018
Joined: Sat 12 May 2012 21:38

Re: G'MIC improved layer support request

Post by Herbert123 »

Thank you for checking. I installed G'MIC in Photoshop at my workplace, and it does the same thing!

So it seems to be a limitation of the plugin itself.

I have found that just using the External Program option works really well instead:

[1] install Krita, and add it to the External Programs (Filter-->External Programs-->Manage External Programs).
[2] use TIFF as the intermediate file format.
[3] Set the second option to Ask if you want to control exactly whether the active layer, a flattened version, or all layers are sent over.
[4] close the settings.

Now select a layer, and sent it to Krita. Apply the G'MIC filter(s) of your choice (Filter-->G'MIC). When finished, save the file (do not use save as). Switch to PhotoLine, and it automatically picks up on the change. Even new layers are nicely loaded and grouped.

This works great. :D
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
User avatar
NoSi
Betatester
Posts: 1021
Joined: Mon 07 Jan 2008 19:52
Location: Birkenwerder / Berlin

Re: G'MIC improved layer support request

Post by NoSi »

I have to apologize ahead for my directness (and it's in no manner meant in a bad way, rather ironically):

Is it truly the same guy, asking in another thread for less effort using the lasso tool in a special user case, who is describing the installation of another application to get a plugin to work “within PL”?

An additional application with more than quadruple installation size and complete different user interface to get a “bridge” to a plugin, designed for a different (but as well free available) application than the described (→ GIMP)?

A good example of how effort and complexity of something are solely in the eye of the beholder.

No offense.
Screencasts zu Photoline: http://www.buoa.de • Win 10x64 / PL64, immer und ausschließlich die aktuellste Beta-Version.
User avatar
Herbert123
Mitglied
Posts: 2018
Joined: Sat 12 May 2012 21:38

Re: G'MIC improved layer support request

Post by Herbert123 »

@NoSi

G'MIC is available as a standard Photoshop plugin and works within PhotoLine - the previously mentioned issue is that G'MIC will write some of the filters' result to disk rather than forward the result to the host application. This is cumbersome, but as it turned out that's how the plugin behaves in Photoshop as well.

So no direct solution exists unless the G'MIC developers fix this (even though I am unsure if it is fixable, which is up ot them to figure out, of course).

In this particular case to prevent having to load results manually the app link to Krita is a much more efficient solution - at the expense of including a second piece of software into my pipeline. I use PhotoLine almost daily for all sorts of tasks and jobs, except digital painting - use the right tool for the right job is my motto. Which for me is Krita, and I am as familiar with Krita as I am with PhotoLine. Roundtripping the layer from PhotoLine into Krita for applying g'mic filters works very efficiently. And seeing that I have been using both apps for a long time now, this turned out to be the most efficient and quickest approach.

Please note that the G'MIC plugin works in PhotoLine - which means it is not necessary to use Krita as an intermediary app. That said, if Krita is used this way it does allow for a more efficient workflow.

Efficiency and simplicity are not the same things. They certainly are not in this particular case. And what is simple for one user may be hard to understand or use for another user - and vice versa.

Comparing this issue with the direct pixel manipulation using selections/lassos and the layer tool is like comparing apples and potatoes - entirely different. The usage case for the selection/lasso direct pixel manipulation is something very very basic and common.
Personally, I have to perform these type of moves hundreds of times when working on various jobs. Not only acted PhotoLine completely different compared to other image editors when I first started to transition to PhotoLine for my work, the lack of an option to allow selections to affect pixels directly could make it just very cumbersome to work with depending on the type of job. For example, even merely adjusting a highres black and white paper scan of maps and building drawings (components, lettering, etc.) takes SO much extra time and clicks/key presses. In other image editors it is a simple case of selecting a part, then switch to the move/layer tool and move it. And to copy hold down the alt key. When the selection is dropped, the result is a change made to the base master layer.

In PhotoLine the same tasks took ages because first a selection had to be cut or copied into a new layer, moved around, and then merged again. And it is rather odd behaviour to have the selection move with the entire layer instead - I mean: as far as I am aware, selecting pixels means you want to be able to transform those pixels directly or copying/cutting the pixels to a new layer. I and other users never understood that a selection/lasso would move with the entire layer instead. Nor does it seem to be the standard behaviour in other image editors (I am not saying PhotoLine should follow other software in how it behaves - far from it, actually. But if a commonly used workflow is impossible and even makes it relatively cumbersome to accomplish certain tasks for no obvious reason - sometimes a direct bitmap editing approach works best, and in other cases a layered workflow is preferred.

While it may seem like little extra work, it really adds up if you have to perform hundreds of adjustments on scanned drawings throughout the week. And even for things like user interface design and pixel art it can be so simple and effective to select, move pixels, drop selection instead of having to deal with extra steps of having to deal with additional layers which have to be merged with the master layer all. the. time.

I do understand that we as users all adopt different ways of working. The strength of PhotoLine, as I see it, is that it supports a wide scope and range of workflows and often improves on existing ones like in Photoshop in my opinion.
But for this one very basic thing. I for one am elated and in high spirits now that it is being implemented. It's already allowing/allowed me to stay working in PhotoLine for two jobs last week: one for game asset work, and one for editing a scan. No more workarounds required for quick bitmap editing! :-)
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait