Image v1

13 views
Skip to first unread message

Carlo Hogeveen

unread,
Jul 5, 2025, 9:47:00 AMJul 5
to Semware @ GoogleGroups

I did something that is useless yet, but have fun with anyway.

Last Christmas I showed that GUI TSE can show one specific image.
I now have an "Image" extension that can show almost any image (format) in GUI TSE v4.41.44 (18 Jan 2021) upwards.

https://ecarlo.nl/tse/ToolsAndExtensions.html#Image

Because it would be insane to build all image formats into a TSE macro, it uses IrfanView to convert other image formats to one it
understands.
In other words, currently you must be willing to install IrfanView in Windows for the TSE extension to work.
https://irfanview.com

Let me know if you already have a favorite image converter that fulfills these requirements:
- It must be able to convert other image formats to the .ppm format.
- It must be able to resize images in both dimensions.
- It must be able to do both these things from the command line.
Linux answers to this question are especially welcome.

Have fun,
Carlo



Knud van Eeden

unread,
Jul 5, 2025, 7:58:28 PMJul 5
to sem...@googlegroups.com
1. Definitely very useful, e.g. you do not really have to run an external viewer.

2. Installation here:

a. you must add 'Image' to the autoload list (menu > 'Macro' > 'Autoload' > press <Insert> > Add image > <Enter>

b. restart

b. you must change the path to your irfanview inside image.s

E.g. I changed:
  // IRFANVIEW_EXE = 'C:\Program Files\IrfanView\i_view64.exe'
  IRFANVIEW_EXE = 'G:\GRAPHICS\irfanview\i_view64.exe'

c. It is not necessary to put it in the .mac directory.
I did put image.s in my working directory and compiled
it there to image.mac.

d. Restart.

e. Then if you load e.g. (any) graphics file in TSE
(e.g. menu > 'File' > 'Open' > XMasGift.png)
It will show then inside TSE on the left side.

f. I tested it with .png files, .gif files, .jpg files.

with friendly greetings
Knud van Eeden







--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/semware/004301dbedb3%2443aaaf70%24cb000e50%24%40ecarlo.nl.

Knud van Eeden

unread,
Jul 5, 2025, 8:06:39 PMJul 5
to sem...@googlegroups.com
image.png

Knud van Eeden

unread,
Jul 5, 2025, 8:13:12 PMJul 5
to sem...@googlegroups.com
One application I can immediately think of:

1. Run a mathematics program in TSE
2. E.g. that mathematics program and or an external program like PowerShell or similar creates dynamically at that point in time a plot / graph / curve image file.
3. You then load the plot / graph / curve image file in TSE to see the graphical end result.

with friendly greetings
Knud van Eeden

Knud van Eeden

unread,
Jul 5, 2025, 8:34:11 PMJul 5
to sem...@googlegroups.com
Maybe an idea for Linux:

sudo apt install imagemagick

TSE SAL:

 // Use ImageMagick to convert to scaled PPM
  convertCmdS = Format("convert "; QuotePath(inputFileS); " -resize 80x40! ppm:"; tmpPPMFileS)
  DOS(convertCmdS)


Carlo Hogeveen

unread,
Jul 6, 2025, 6:55:29 AMJul 6
to sem...@googlegroups.com

Happy to see others download something that is just for fun.
In Image v1.0.1 I fixed a bug for spaces in filenames.
( I found out again that Dos() needs more than just quoted filenames.)
https://ecarlo.nl/tse/ToolsAndExtensions.html#Image

Carlo



Reply all
Reply to author
Forward
0 new messages