Archive for the ‘graphics’ Category

Resize script in Paint Shop Pro X2

Thursday, May 28th, 2009

PSP X2 resize scriptI batch-process-resized some photos in PSP X2, & realized too late (after I had emailed 90 photos off to various relatives) that everyone appeared a little taller & thinner than they normally are. Not so bad right? Except that headshots look a little weird. The photos were taken with different cameras with slightly different aspect ratios.

So here’s an easy way to batch process/resize photos with a PSP X2 script, each to their correct aspect ratio (fixed width, variable height):

  • Open any one image.
  • File, Script, Start recording … resize the image.
  • File, Script, Save recording … save it under your scripts folder, which is generally Documents/My PSP Files/Scripts-Restricted/
  • File, Script, Edit.. browse to your scripts folder & select the resize script that you just saved.
  • click the Text Editor button
  • delete or comment out (# in front of the line) the ‘Height’ AND ‘AspectRatio’ lines. Setting them both to None works too. Make sure ‘MaintainAspectRatio’ is set to True.
  • Save & enjoy not looking warped.

IE6/IE7 PNG gAMA bug makes PNGs appear darker

Tuesday, October 24th, 2006

IE PNG gAMA bug
The link PNGs appear darker, except for Email A Friend, which has the gAMA chunk removed.

In setting up the new vehicle details page for DDC, I noticed that the background color for the 24-bit PNGs did not match the css background color, but only in IE6.

Searching online, I found this is a known bug with IE that stems from a flawed interpretation of the PNG’s gAMA setting. It’s fantastic that the IE team added PNG alpha transparency to IE7, but apparently they kept the gAMA bug in IE7 to make sure browser compatibility specialists keep their jobs for years to come.

In short, the fix is to remove the gAMA chunk using a tool such as TweakPNG or Pngcrush — I used TweakPNG (freeware, super easy to use, no installer) which worked great for fixing one image at a time. Fun stuff.