cli command enquiry

I’d like to layer five images, four of which have transparent areas of increasing proportions…(as shown…) into one image, how is this possible with g’mic, I’ve tried using ‘append’ and ‘montage’ with no such luck as of yet. Any assistance gratefully received!

Hi Martin,
Will this help? Can G'MIC batch-process multiple layers then merge them?

Have fun!
Claes in Lund, Sweden

1 Like

Unfortunately no, seems to either output multiple image or puts them together again wrongly…
I originally came up with my images using the fx_perspective_scale command, now I just want to re-arrange them together.

Hi,

how should it look when merged? Like this?
gmic run 'sp monalisa fx_perspective_scale 5,75,50,0,1 blend alpha'

1 Like

Or are we aiming to merge the various detail scales into one image?

1 Like

Thanks people - will try Prawnsushi’s example too, sort of like what I’m looking for…
Garagecoder’s ‘Exfusion3’ filter seems to be as close as I can get, using the commands…

gmic v -99 str_0000_000000.png str_0001_000001.png str_0002_000002.png str_0003_000003.png str_0004_000004.png exfusion3 0.3,0.3,0.2,0.3,-3,0 output zzx2_0000.tiff
gmic v -99 str_0001_000000.png str_0003_000001.png str_0005_000002.png str_0007_000003.png str_0009_000004.png exfusion3 0.3,0.3,0.2,0.3,-3,0 output zzx2_0001.tiff
gmic v -99 str_0002_000000.png str_0005_000001.png str_0008_000002.png str_0011_000003.png str_0014_000004.png exfusion3 0.3,0.3,0.2,0.3,-3,0 output zzx2_0002.tiff

etc

If you are generating texture mipmaps as multipages tiffs then maybe exfusion3 is what you’re looking for (i’ve never used it).

The example i gave will flatten the image just as the command fx_perspective_scale 5,75,50,0,0 . (notice the last zero).

output zzx2_0000.tif,auto,none,1 will save your files as uncompressed multipages tiff.

1 Like

Didn’t mean to export to tiffs should be png, and just realised it’s not a filter from Garagecoder, but from Iain Ferguson (in the Testing section), apologies for the misattribution (it was late :slight_smile: ).
Anyway although the filter (exfusion3) is close to what I want, it does tend to make the individual layers somewhat opaque … or semi-tranparent (I don’t have the technical terminology to mind, sorry), but the output I require is like the above image I posted of the Gimp canvas, so your solution, to continue with the ‘fx_perspective_scale’ route seems more of a possibilty, but I can’t seem to get it to work with an image pipe of 5 separate images (with transparency).

Can you post your results? Or does it fail with an error?

I replicated (sort of) your layers in Gimp and then exported to .png.
Here is what i get when opening the images with G’MIC (black = alpha):

And then merging with blend alpha (don’t mind the black bars It’s just bad editing) :

All I did was :
gmic 1.png 2.png 3.png 4.png 5.png d blend alpha

3 Likes

wow, that easy - thanks again mate! :v:

2 Likes

Looks like a nice experiment :slight_smile:

PS : Forgot to remove the d in the command ! Remove it if you don’t want the images to be displayed for no reason.

Thanks! Yes, I scrubbed the ‘d’… well the blend alpha method, as well as being exactly what I was after, is also much quicker than the exfusion method (3 or 4 times faster), however both have their merits…
Exfusion3 (or maybe exfusion5, can’t quite remember…):

blend alpha (reduced scale):

You can also change the blend factor (from 0 to 100%) or change the blending method :
blend alpha,50%
blend screen,100%

Type gmic h blend to see all modes or check them here :

Wow, what is this for?!

To me, it looks like it can be used for testing game textures.