News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

GuiImage right-click menu improved

Started by jj2007, May 30, 2022, 08:49:01 AM

Previous topic - Next topic

jj2007

This source (which needs version 30 May to build) picks an image from the clipboard and displays it:

include \masm32\MasmBasic\Res\MbGui.asm
Event Paint
  GuiImage clipboard, fit
GuiEnd


By right-clicking into the image...


... you can save it to a file (default is jpg, but png, bmp, gif or tiff work, too).
Here is a usage example - a screenshot of the source behind the source:


hutch--

If you want to have a play with a 64 bit version that can get an image from the clipboard, have a look at the example called "JpgTool".

Both Erol and marinus posted very useful code that made this example possible.

jj2007

Thanks, Hutch :thumbsup:

In fact, I already had a look at JpgTool - see below, from the Feedback on 64 bit BETA masm64 thread :thup:

Quote from: jj2007 on May 11, 2022, 05:51:10 AM
Nice - I got it running with RichMasm. All it needs is the attached batch file extracted as \Masm64\MbMasm64.bat, plus one comment in the actual source:
    include \masm64\include64\masm64rt.inc   ; OPT_Batch \Masm64\MbMasm64.bat

You may have to hit F6 twice in RichMasm. I've tested it with some of the \Masm64\Examples\* sources, so far without problems. For example, \Masm64\Examples\Advanced\JpgTool\JpgTool.asm (one of the bigger sources) works like a charm :thumbsup:

Grab the latest RichMasm here, extract the attached files to some folder, then move only the file MbMasm64.bat over to its location \Masm64\MbMasm64.bat, open the Edit64.asc and hit F6 (twice, the first time it throws an error - will have to investigate why). As usual, no saving needed. Test it by clicking into the bookmark the dialog to the right, then change e.g. Floating points into Floating points, too and hit F6 :biggrin:

In fact, there is even a link to your example on the first page of the manual - just click on it, then hit F6 to assemble & run JpgTool :cool: