I wish if standalone gmic_qt.exe has a "clipboard to clipboard" function.

I wish if standalone gmic_qt.exe has a “read from clipboard, write to clipboard” function.

I imagine like gmic_qt.exe --clipboard.

  1. Copy the image data into the clipboard from any favorite minor league paint app.
  2. Run standalone gmic_qt.exe. (result overwrite to clipboard)
  3. Paste it back.

If that function exists, gmic_qt.exe will be some kind of the universal plugin to all paint apps which has clipboard function at least.

I achive crudely that by this .bat now.
I would like to introduce G’MIC to the minor league paint app users that app doesn’t have any decent artistic filters. (and I’m the one of that users)
Is there more efficient and safety way to introduce this tip to them?

@echo off

rem using ImageMagick to convert clipboard to temporary image file.
convert.exe clipboard:image "%TMP%\clipboardTemp4GMIC.png"
if %ERRORLEVEL% neq 0 ( 

gmic_qt.exe --output "%TMP%\clipboardTemp4GMICout.png" "%TMP%\clipboardTemp4GMIC.png"

rem use powershell to convert the output image to clipboard.
PowerShell -Command Add-Type -AssemblyName System.Windows.Forms;[Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::FromFile('%TMP%\clipboardTemp4GMICout.png'));

Unfortunately, the Windows clipboard is not a great way to exchange images between applications.

Your success will depend on the applications that are sending and receiving the image data.
Each app has its own quirks with how it reads and writes images from the clipboard, especially when the clipboard images have an alpha channel.

Qt has a QClipboard class that wraps the Windows clipboard, but I am not sure how hard it would be to modify gmic_qt to use it.

1 Like

I also want G’MIC to have clipboard feature and a way to put the result back into clipboard. It would also enable me to have a workaround for filters that need original dimension of image though I only have 1 that needs it, and two if you count a few pdn filters I converted that output changes by dimension besides making the filter output fit the dimension of image.

1 Like

Yes, this wonky .bat loss datas from original.
“Output the PNG, apply filter, input the PNG to the specific app again”
this is not good way to introduce.

So, I would like to know more smart way for the hopeless apps which has few or no filters.

G’MIC-Qt has been actually designed with a specific API (https://github.com/c-koi/gmic-qt/blob/master/NEW_HOST_HOWTO.md) so that with some efforts, any software could develop its own G’MIC plug-in, target for the application.
That is what we did for GIMP and what @PDN_GMIC did for Paint.NET and 8bf hosts.

1 Like


Win clipboard Documentation :

copyq a GPL utility with source code that processes the images (Linux, OS X, Windows) :


git clone https://github.com/hluk/CopyQ.git

File to clipboard :

copyq.exe copy image/jpeg - < C:\test\myimage.jpg

copyq.exe copy image/png - < C:\test\myimage.png

Clipboard to file (copy visible) :

copyq.exe read image/png 0 > C:\test\image_from_clipboard.png


1 Like

yes, I believe sincerely, G’MIC has value that be adopted every all paint apps, and GMIC has the bright efficient way.

But there are not few developers who has no ears or literally dead who left behind the proprietary software.
I would like to find the easier way to inject forcedly the part of G’MIC to the dead body.(the way for who can’t understand how to renovate the program like me)

I just wish I have a skill (and formal rights!) to decompile and renovate it!

Thank you!
I didn’t like my “Windows only method”.
Your method can be done by many people.

It’s already open-source. G’MIC could do with more image types, and built-in type. But, I’m not sure when there can be more image types.

1 Like