ANNOUNCEMENT: Free Scaling Software

aruzinsky

Senior Member
Messages
2,403
Reaction score
0
Location
US
Download from here:

http://www.general-cathexis.com/sar.zip

Here is what the readme file says:

SOFTWARE TITLE AND COPYRIGHT:

SAR Interpolate
(Freeware Version)
Version 1.01
Copyright © 2002
Steven A. Ruzinsky, Ph.D.
All rights reserved.

e-mail: [email protected]

LEGAL DISCLAIMER:

This software is provided "as is" and the user assumes all risk associated with the use of this software. Under no circumstance shall the author be liable for damages caused by this software. This software is freeware and may only be distributed in the form of the original ZIP file containing the following files: readme.txt, sar.exe. This software may not be sold, rented, or included as part of any commercial package. This software may not be modified, reverse-engineered or disassembled. The author grants you the permission to use this software but full ownership and copyright remains with the author.

DESCRIPTION:

This software scales images. The creation of this software was motivated by the desire to give the public access to the enlargement algorithm of Dr. Xin Li. The Xin Li algorithm completely eliminates "jaggies." Since the Xin Li algorithm only directly enlarges images by a factor of 2X, Bicubic and Lanczos interpolation methods are included in the program to facilitate rescaling to arbitrary dimensions.

Only BMP, PNG, JPG, FITS and FDIB file formats are supported. Only 24 bit and greater bit depth sub-formats are supported. This software is fully capable of reading and writing 48 bit PNG and FITS files and 32 bit FITS files. (GIMP will read but not write all FITS formats) The native format of this program is FDIB which is 32 bit floating point.

I am not a professional programmer and this program was written and compiled using an antiquated (1996) Borland C++ v. 5.0 compiler with OWL classes. There are no bells and whistles and you can expect it to crash often. Also, this program cannot be normally minimized or closed while processing an image. To close the program while processing an image, it is necessary to perform Ctrl-Alt-Del.

SYSTEM REQUIREMENTS:

PC with a 24 or 32 bit graphic display. SAR Interpolate has only been tested under Windows ME. This program does not use RAM efficiently and very large amounts of RAM are required for large images. If you notice a large amount of hard disk activity, that means virtual memory is being used and more RAM is needed.

INSTALLATION:

Sar.exe is a single file program that requires no installation. Just run sar.exe to invoke the program. To uninstall, simply delete sar.exe.

USAGE HINTS:

F1 - refresh (almost useless in current version because it is disabled after resizing)

F2 - Apply operation indicated as last item on menu bar.
To enter an operation:
1. Make sure last item says, "NOOP," by left clicking on last item.
2. Hold down Ctrl key while left clicking selection on menu bar, e.g., Bicubic.
3. Enter prompted parameters.

4. After entering parameters, no operation will be performed until F2 is pressed or Batch File Operation is invoked.

F5 - full screen view

F6 - full screen view with image sized to fill screen

Arrow Keys - scroll image

Right Mouse Button - Drag for quick crop of image.

Entering Parameters -

When using Bilinear, Bicubic or Lanczos, you will be prompted to enter scale factors. If and only if both are set to 1 or either is set to zero, you will then be prompted for output dimensions. The proper scale factors will then be calculated for you. When entering numbers separated by commas, you can optionally use / and , e.g., "1/3" instead of "0.33333333."

Parameter Options for Xin Li interpolation -

For the first set of parameters, to properly understand what 4, 6, etc. represent, you have to read Xin Li's

thesis. Roughly speaking, these numbers represent a window size surrounding an interpolated pixel over which calculations are performed. The larger the number, the more time it takes. Usually, the larger the number, the more edges and lines will be smoothed and the greater the paint-like artifacts. Negative and positive numbers have the same meaning, except that when a negative number is used, my modified version of the original algorithm is used. The modified version has shown some improvements over the original version. The second set of parameters specifies how many times to double the size of an image. 1 = 2x the original size. 2 = 4x the original size, etc.

Parameters for other methods -

Bicubic you are given access to a parameter that is completely endemic to Bicubic interpolation. Most other programs don't do this. Also, notice that Lanczos is implemented in a special way for size reductions. For example, compare a 1/3 X result with that of other programs.

Batch Operations -

Prepare a text file, .txt, that lists all the image files that you want to apply the same operation to and put it in a directory with the image files. Then set F2 as described above. (Or, set to NOOP for file format conversions without resizing.) Then invoke File-> Batch File Operation. You will be prompted for the text file name.

Save - (almost useless in current version because it is disabled after resizing - use Save As)

Save As - Save the current document in a new location or with a different filename. Does not automatically open newly saved file. (For example, suppose image.png is opened and then immediately saved as image.jpg. Pressing F1 will refresh image.png, not image.jpg.) To save to a different format, simply append the extension of your choice to the filename (png, bmp, jpg, fit).

KNOWN BUGS:

Under Windows XP, the image is not properly automatically centered on the screen (also, with F5). Use arrow keys to reposition image on screen.
 
http://www.general-cathexis.com/sar1.02.zip

NEW FOR VERSION 1.02:

1.
Use Scratch Disk -

With this option checked, RAM will be conserved, but processing will take slightly longer. The required amount of free disk space, in bytes, is approximately 16 times the maximum number of pixels in the input and output image. During processing, the program writes three files, tempr.mat, tempg.mat and tempb.mat in the same directory that sar.exe is installed. Normally, after processing, these files will automatically be deleted. However, if the program is abnormally halted, these files will remain. Since these files can be very large, they should be manually removed. Also, the amount of free disk space is not automatically checked by the program.

For example, suppose you want to enlarge a 4624 x 2618 image 2X in both horizontal and vertical directions. The required hard disk space is:

16 * 2 * 4624 * 2 * 2618 = 7,747,604 bytes = 7.8 MB

Also, in this example, slightly more than 7.8 MB of RAM will be needed. In borderline cases, the image may be properly processed, but you won't be able to save it. I suspect that the program will be less likely to crash with this "Use Scratch Disk" checked.

2.
Sound Notification of Process Completion -

Now, you can have bells and whistles! Put a WAV file of your choice into the same directory as sar.exe and rename it "sar.wav.' Then check "Sound Notification of Process Completion" under options.
 
Thanks for posting this. Image quality is superb, and the new features are great for slower systems or resource intensive files. Being able to be 'notified' by the computer when processing is done is very convenient.
http://www.general-cathexis.com/sar1.02.zip

NEW FOR VERSION 1.02:

1.
Use Scratch Disk -
With this option checked, RAM will be conserved, but processing
will take slightly longer. The required amount of free disk space,
in bytes, is approximately 16 times the maximum number of pixels in
the input and output image. During processing, the program writes
three files, tempr.mat, tempg.mat and tempb.mat in the same
directory that sar.exe is installed. Normally, after processing,
these files will automatically be deleted. However, if the program
is abnormally halted, these files will remain. Since these files
can be very large, they should be manually removed. Also, the
amount of free disk space is not automatically checked by the
program.

For example, suppose you want to enlarge a 4624 x 2618 image 2X in
both horizontal and vertical directions. The required hard disk
space is:

16 * 2 * 4624 * 2 * 2618 = 7,747,604 bytes = 7.8 MB

Also, in this example, slightly more than 7.8 MB of RAM will be
needed. In borderline cases, the image may be properly processed,
but you won't be able to save it. I suspect that the program will
be less likely to crash with this "Use Scratch Disk" checked.

2.
Sound Notification of Process Completion -
Now, you can have bells and whistles! Put a WAV file of your
choice into the same directory as sar.exe and rename it "sar.wav.'
Then check "Sound Notification of Process Completion" under options.
 
aruzinsky, I'm really impressed with the final image quality. Will you be able to upgrade it so it will work with TIFF files?
Dennis D

--Dennis D
 
Thank you very much. You must have an incredible repository in terms of knowledge and software. Many thanks again for sharing it with us.

Sincereley.--AlienOly C-4040z, my first digital.
 
Wow, aruzinsky! That is one dynamite program.

This should make prints much more pleasing going by just the lack of pixelation. Looking at a zoomed up image next to your enlargement at the same size is like night and day.

Thank you very much.

Wilhelm
 
from JPEG/GIF, JPEG 2K, LDF, LWF, PNG/PNM, and TIFF. rICHARD
Yes, but not from 48 bit TIFF to 48 bit PNG. Irfanview will open
but not save 48 bit format.
of a CP 995? UTL that info in the guide and the DPReview. Doesn't mean that info wasn't there, just that I couldn't find it.

2 bit responses will be drawn and quartered until the minimum is met. R
 
Your program looks marvelous- but I cannot get it to run under Win NT.

It opens, then as soon as I try to apply the selected transformation my application stops responding.

If you ever get around to solving this please be sure to post the information her
many thanks
 
Are you sure the program has stopped responding, the reason I ask this is because it takes a long time to do the processing. I did a 12mb PNG file(converted from a TIFF file) and it took one and a half hours to finish on a 1.33 GHZ AMD with 768mbs of RAM on Windows 2000.
Dennis D
Your program looks marvelous- but I cannot get it to run under Win NT.
It opens, then as soon as I try to apply the selected
transformation my application stops responding.
If you ever get around to solving this please be sure to post the
information her
many thanks
--Dennis D
 
Your program looks marvelous- but I cannot get it to run under Win NT.
It opens, then as soon as I try to apply the selected
transformation my application stops responding.
If you ever get around to solving this please be sure to post the
information her
many thanks
mac, did you test it on a small, e.g., 320x280, image? Processing a large image with the Xin Li method takes a long time.
 
you may be right-

my task manager shows 'not responding', but in fact the hour glass is still there... I did manage to process a small image. Oddly with some of my jpg images they do not display in the window, but they get processed anyway.
keep up the good work
 
from JPEG/GIF, JPEG 2K, LDF, LWF, PNG/PNM, and TIFF. rICHARD
Yes, but not from 48 bit TIFF to 48 bit PNG. Irfanview will open
but not save 48 bit format.
of a CP 995? UTL that info in the guide and the DPReview. Doesn't
mean that info wasn't there, just that I couldn't find it.

2 bit responses will be drawn and quartered until the minimum is
met. R
would have been more obvious. My apoligies to any offense, none was intended. I saw an opportunity for a sniper (good natured of course) to take a shot at my camera, and I wanted it known I was ready.

I've yet to have any success with any of this. For the tif2png, all I get is a flash of black screen with some possiblity of text. Too fast to tell.

Saving a tif to the highest quality jpg using PS (12, what ever that means), shows no benefit. Any thoughts. TIA, Richard
 
from JPEG/GIF, JPEG 2K, LDF, LWF, PNG/PNM, and TIFF. rICHARD
Yes, but not from 48 bit TIFF to 48 bit PNG. Irfanview will open
but not save 48 bit format.
of a CP 995? UTL that info in the guide and the DPReview. Doesn't
mean that info wasn't there, just that I couldn't find it.

2 bit responses will be drawn and quartered until the minimum is
met. R
would have been more obvious. My apoligies to any offense, none
was intended. I saw an opportunity for a sniper (good natured of
course) to take a shot at my camera, and I wanted it known I was
ready.

I've yet to have any success with any of this. For the tif2png,
all I get is a flash of black screen with some possiblity of text.
Too fast to tell.

Saving a tif to the highest quality jpg using PS (12, what ever
that means), shows no benefit. Any thoughts. TIA, Richard
No offense taken.

tif2png.exe is a command line program which means that you operate it in that dos-like window. The only display is in that dos-like window.

Bring up that window by running C:\WINDOWS\COMMAND.COM. Go to the directory that tiff2png is installed. Type "tiff2png.exe" in that window , press enter, and directions will appear. Personally, I haven't used it much, but, if I remember correctly, you execute, for example, "tiff2png.exe name1.tif name2.png." If you have a lot of files to convert, the best way to do this is write a list of these commands in a BAT file and execute the BAT file.
 
mac wrote:
you may be right-
my task manager shows 'not responding', but in fact the hour glass
is still there... I did manage to process a small image. Oddly with
some of my jpg images they do not display in the window, but they
get processed anyway.
If you see black when you open up an image then use the up or down arrow buttons to bring the photo into view (that's what I have to do with mine.
Dennis D
--Dennis D
 
Hi Azurinsky,

Since the process works itself through the image, would it be possible to provide a progress bar? Or perhaps just a percentage that counts up on the status bar?

Kind regards,

Nils

PS where can I find resources on this Xin Li method?
Your program looks marvelous- but I cannot get it to run under Win NT.
It opens, then as soon as I try to apply the selected
transformation my application stops responding.
If you ever get around to solving this please be sure to post the
information her
many thanks
mac, did you test it on a small, e.g., 320x280, image? Processing
a large image with the Xin Li method takes a long time.
--
Nils Haeck
Developer of ABC-View Manager (image management software)
http://www.abc-view.com
 
Nils,

I suppose it is possible, but it is not easy for me because I am an electrical engineer and not a professional programmer. Personally, I find it easy to calculate how long the processing will take since the time is linear with the number of pixels in the image. It may interest you to know that this was written with a $30 Borland 5.0 C++ compiler. I just got a $2500 MS Visual Studio .NET Enterprise Architect as a gift from someone that I sold exclusive rights to my Xin Li code. Apparently, the MS C++ compiler runs floating point code 3.5 to 6.5 faster than my old compiler, but I really don't know how to use it, so you probably won't see any improvements to my program for a long time.

You can write your own code from a description of the algorithm in Dr. Xin Li's thesis which you can download from here:

http://www.ee.princeton.edu/~lixin/
Since the process works itself through the image, would it be
possible to provide a progress bar? Or perhaps just a percentage
that counts up on the status bar?

Kind regards,

Nils

PS where can I find resources on this Xin Li method?
Your program looks marvelous- but I cannot get it to run under Win NT.
It opens, then as soon as I try to apply the selected
transformation my application stops responding.
If you ever get around to solving this please be sure to post the
information her
many thanks
mac, did you test it on a small, e.g., 320x280, image? Processing
a large image with the Xin Li method takes a long time.
--
Nils Haeck
Developer of ABC-View Manager (image management software)
http://www.abc-view.com
 

Keyboard shortcuts

Back
Top