Creating High Resolution PPM images on Linux

Questions and discussions of a general nature about KnotPlot

Creating High Resolution PPM images on Linux

Postby knotti on Thu Jul 11, 2013 10:25 pm

I'm a new user to KnotPlot on Xubuntu Linux 13.

My Maths skills are quite poor, but I like to use it
to create decorative images. I noticed that the export>imgout button captures the
current knot exactly as shown in the KnotPlot output window. As far as I can tell,
it is a screen capture of that window.

This is how I capture high resolution images, ( 30 megapixel ) of that window. Such an image could be used
for high quality printing. The technique works for other programs which output bitmap images in the same way.

Linux has a small program called 'xrandr' which allows the screen resolution to be
extended beyond the maximum resolution of the attached monitor. This can be used to
capture very large images of the knots generated by KnotPlot, exactly how you
see them in the output window.

From the Linux console, using my PC as an example:

$ xrandr

gives the following output :

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
1920x1080 60.0*+
1360x768 60.0
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0 59.9
HDMI-0 disconnected (normal left inverted right x axis y axis)

My connected monitor is called 'VGA-0' ( yours will be different ), so the following command tells it to display
at the current resolution of 1920x1080 :

$ xrandr --output VGA-0 --scale 1x1

To display at 1.5 times the current resolution I use :

$ xrandr --output VGA-0 --scale 1.5x1.5

or to display at 2 times the current resolution would be :

$ xrandr --output VGA-0 --scale 2x2

To go back to the original resolution use :

$ xrandr --output VGA-0 --scale 1x1

To capture my images, I click on the maximise button of the KnotPlot output window so it fills
the screen.
I then use one of the command lines above to choose the increase in resolution I want.

If the resolution is a higher multiple such as 3 or even 4, then it takes time for the
system to resize, and for the mouse to respond again. For multiples of 4, my little system can take over 2 minutes.

Once this is done, I click the imgout button on the export tab of the KnotPlot control panel
and wait until it returns to the normal colour.

In the Linux console :

$ xrandr --output VGA-0 --scale 1x1

Takes you back to the begining.

I would recommend that you use the 1x1 command first, so that you can use the up arrow key in the
Linux console to recall the orignal resolution. It can be difficult or impossible to read the screen at the high
multiples. Of course you could always assign a Linux shortcut key to that command.

I have linked to an image of a small cropped section of a full screen decorative knot to show the increase in resolution
at various multiples.

Anyway, hope this helps.
Posts: 1
Joined: Thu Jul 11, 2013 8:39 pm

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest