Image proportion Retention Help

Tips for creating and manipulating planet textures for Celestia.
Topic author
Ozark
Posts: 44
Joined: 09.07.2007
With us: 17 years 2 months
Location: Plymouth, MN

Image proportion Retention Help

Post #1by Ozark » 07.08.2007, 03:40

Does anyone out there Know of maybe a bash script or an exe program to resize an image while retaining image proportions?

For example I'm coming across a lot of files that are saved in different sizes such as 43201x15601 but when converting them to say, 32768x16384 the image proportions turn out more squared, and don't line up properly with my other maps.
OZARK

Celestia 1.5.0
Windows XP Home Edition
Pentium 3.4 ghz E.E
2GB ddr Ram
Radeon 9550 AGP 256 mb

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 7 months
Location: Darmstadt, Germany.

Post #2by Spaceman Spiff » 07.08.2007, 09:58

Hmm, you're trying to resize one of them thar Nightttime Lights Time Series images at your recommended http://www.ngdc.noaa.gov/dmsp/global_composites_v2.html, aren't you?

I note 43201 ?— 15601 isn't 2:1, and that must be because those images only cover ?±65?° in latitude: (15601-1)/(43201-1)?—180?° = 65?°. It should be 43201 ?— 21601.

I also wonder if the fact that the horizontal dimension is 43201, not 43200 means that the first and last column is a repeat of the ?±180?° meridian?

I suggest you resize the original image to 43200 ?— 15600 first, then resize the canvas to 43200 ?— 21600, leaving the original image centred, and filling new canvas with black, or alternatively those older, lower resolution light maps with aurorae.

Finally, resize to powers of 2, of course!

Spiff.

RVS
Posts: 64
Joined: 02.11.2006
With us: 17 years 11 months
Location: Russia

Re: Image proportion Retention Help

Post #3by RVS » 07.08.2007, 10:05

Ozark wrote:Does anyone out there Know of maybe a bash script or an exe program to resize an image while retaining image proportions?


IrfanView (http://www.irfanview.com/) can do it for you.

Topic author
Ozark
Posts: 44
Joined: 09.07.2007
With us: 17 years 2 months
Location: Plymouth, MN

Post #4by Ozark » 07.08.2007, 21:32

Thanks for the tip Spaceman Spiff, I'll give it a try. BTW you are quite right about the night lights! :wink:
OZARK



Celestia 1.5.0

Windows XP Home Edition

Pentium 3.4 ghz E.E

2GB ddr Ram

Radeon 9550 AGP 256 mb

Topic author
Ozark
Posts: 44
Joined: 09.07.2007
With us: 17 years 2 months
Location: Plymouth, MN

Post #5by Ozark » 11.08.2007, 15:17

8) Thanks again Spaceman Spiff. A very clever fix. Here are a couple before and after shots.

BadNight:

Image

Goodnight:

Image

Ozark
OZARK



Celestia 1.5.0

Windows XP Home Edition

Pentium 3.4 ghz E.E

2GB ddr Ram

Radeon 9550 AGP 256 mb


Return to “Textures”