Saving graphics files.

  • Thread starter Thread starter John Fitzsimons
  • Start date Start date
J

John Fitzsimons

Suppose I want to save a graphics file of over 2MB so that it was now
500KB ?

and/or

Suppose I want to save a graphics file at eg. 75DPI ?

What program/steps would be required to do either/both steps please ?

Regards, John.
 
John Fitzsimons said:
Suppose I want to save a graphics file of over 2MB so that it
was now 500KB ?

IrfanView lets you specify the image format to save the graphic.
Choose JPEG for lossy compression, choose PNG or GIF for non-lossy
compression. Play with the compression level setting to generate a
file with the size you need.
Suppose I want to save a graphics file at eg. 75DPI ?

IrfanView lets you resample bitmaps images to any resolution. See
Image menu > Resize/Resample.

Regards,
Wald
 
John said:
Suppose I want to save a graphics file of over 2MB so that it was now
500KB ?

Resizing or use compression (in both cases loss of quality)
Suppose I want to save a graphics file at eg. 75DPI ?

Nothing. DPI says about how the file is to be printed, not how it is
stored.
What program/steps would be required to do either/both steps please ?

e.g. Irfanview
 
IrfanView lets you specify the image format to save the graphic.
Choose JPEG for lossy compression, choose PNG or GIF for non-lossy
compression. Play with the compression level setting to generate a
file with the size you need.

I don't want to "play" with anything. I just want to save as 500KB. I
don't see any way in IrfanView to do that.
IrfanView lets you resample bitmaps images to any resolution. See
Image menu > Resize/Resample.

Thanks, but I looked at that. DPI was set at 1. Couldn't see what
changing it to 75 did. The image seemed to stay the same.

Now I have a third question. If 6" x 4" @ 75 DPI = 450 x 300 then
wouldn't saving as 450 x 300 give me the solution to my second
query ?

If so then that now leads to a fourth question. Is there a small
program that can give me "conversions" ? In other words ....

6" x 4" = 450 x 300 @ 75DPI
8" x 6" =
10" x 8" =

6" x 4" = 1800 x 1200 @ 300DPI

etc. etc.

Regards, John.


Regards, John.
 
| ....
| If so then that now leads to a fourth question.
| Is there a small program that can give me "conversions"

Cousin John ....

Copy/paste between the lines below
and save as .... pixels.py

# ---------------------------------------------------------

import sys

w = int( sys.argv[ 1 ] )
h = int( sys.argv[ 2 ] )
dpi = int( sys.argv[ 3 ] )

def size( width , height , dpi ) :

pix_w = width * dpi
pix_h = height * dpi

print '\n %s x %s \n' % ( pix_w , pix_h )

size( w , h , dpi

# -----------------------------------------------------------

Run the program passing width height dpi as parameters ....

python pixels.py 6 4 75
python pixels.py 8 6 75
python pixels.py 10 8 75
python pixels.py 6 4 300
 
| ....
| size( w , h , dpi
| ....

John ...

I missed a closing paren on my copy/paste
when posting ....

Last line of the program should be ....

size( w , h , dpi )
 
| ....
| If so then that now leads to a fourth question.
| Is there a small program that can give me "conversions"
Cousin John ....
Copy/paste between the lines below
and save as .... pixels.py

< snip >

Thank you. Unfortunately I get....

C:\Python>python pixels.
Traceback (most recent call last):
File "pixels.py", line 3, in ?
w = int( sys.argv[ 1 ] )
IndexError: list index out of range

Regards, John.
 
| C:\Python>python pixels.
| Traceback (most recent call last):
| File "pixels.py", line 3, in ?
| w = int( sys.argv[ 1 ] )
| IndexError: list index out of range

John ....

Did you include the parameters on the command line ?

python pixels.py 6 4 75
python pixels.py 8 6 75
python pixels.py 10 8 75
python pixels.py 6 4 300

If the parameters are not included on the command line
as shown above, then I also get the same error ....
 
Suppose I want to save a graphics file of over 2MB so that it was now
500KB ?

JPGReduce 2.0 can do that. It's not 100% accurate: it may save 495 kb
or 504 kb. It can open many picture formats, but only saves as JPG.

http://www.jpgreduce.rg3.net
The homepage is often down, but perhaps you'll find another place to DL
it? Anyway, it's a great programme to have, and you don't have to use
it in Portuguese anymore (unless you want to :-).
and/or

Suppose I want to save a graphics file at eg. 75DPI ?

XNView can do that.
http://www.xnview.com
 
| C:\Python>python pixels.
| Traceback (most recent call last):
| File "pixels.py", line 3, in ?
| w = int( sys.argv[ 1 ] )
| IndexError: list index out of range
John ....
Did you include the parameters on the command line ?

No. I was waiting for the script to ask me for the parameters.
python pixels.py 6 4 75
python pixels.py 8 6 75
python pixels.py 10 8 75
python pixels.py 6 4 300
If the parameters are not included on the command line
as shown above, then I also get the same error ....

Thanks, now I just need to remember that. :-)

Regards, John.
 
In <John Fitzsimons
wrote:

Hi Anne,
JPGReduce 2.0 can do that. It's not 100% accurate: it may save 495 kb
or 504 kb. It can open many picture formats, but only saves as JPG.
http://www.jpgreduce.rg3.net
The homepage is often down, but perhaps you'll find another place to DL
it? Anyway, it's a great programme to have, and you don't have to use
it in Portuguese anymore (unless you want to :-).

Good. My Portuguese isn't too good. :-)

Thanks again. :-)

Regards, John.
 
If the parameters are not included on the command line
| Thanks, now I just need to remember that. :-)

John ....

You're welcome ....

Glad you got it working ....
 
Back
Top