AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1999.10.29 22:33 "TIFF scaling", by Tom DeGerlia
1999.11.01 23:41 "Re: TIFF scaling", by Ulrich von Zadow
1999.11.01 14:51 "TIFF scaling", by Tom DeGerlia
1999.11.01 14:50 "TIFF scaling", by Tom DeGerlia
1999.11.02 03:33 "Re: TIFF scaling", by Bob Friesenhahn

1999.11.01 14:51 "TIFF scaling", by Tom DeGerlia

Eric,

Thank you for the information. My application is currently window's specific, so I may be able to use the system function. Can you recommend a good resource (book or otherwise) for graphic algorithms?

Thanks,

Tom

---
Tom DeGerlia

mailto:tom@denverdata.com
http://www.denverdata.com

-----Original Message-----
From: Eric Shapiro [mailto:shapiro@relium.com]

>If not, what is a reasonably efficient way of implementing a
 scaling function?

If you want to be cross-platform, I think you have to roll your own or find something in a book or on the 'net.

Almost all computer platforms these days have some sort of bitmap scaling routines built-in. On the Mac, you just allocate a second GWorld and call CopyBits(). Under Windows I think the call is StretchDIBits() or something like that.

Depending on how you want to scale the image you may like or dislike the choices made by the system routines, though. There are a few different ways to stretch and shrink images. If you need to be fast you do it the easy way. If they are cartoon-like images, you might not need to average surrounding pixels. If they are photograph-like images you may want to do something else. Line drawings a different way. Etc, etc.

Any good graphic algorithm book should cover this.

 -Eric

-------------------------------------------------
 Eric Shapiro                   eric@relium.com
 Relium Corp.                    www.relium.com
-------------------------------------------------