Article View: adobe.photoshop.scripting
Article #1808Scale Image Algorithm
From: Barbu_Bogdan
Date: Tue, 13 Jul 2004 09:39
Date: Tue, 13 Jul 2004 09:39
9 lines
1082 bytes
1082 bytes
Hi! Does any one know an algorithm to scale an image, by keeping the aspect ratio. The image has dimension (PWidth, PHeight), and I want to scale it to the dimension (DimWidth, DimHeight). If the (PWidth, PHeight) are less then (DimWidth, DimHeight) than don't do any scale otherwise scale the image to (DimWidth, DimHeight). This mean that the (DimWidth, DimHeight) are always less then (PWidth, PHeight). The original image is given as a matrix of pixels. Bogdan!
Technical Details
Message-ID:
<3bb50248.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Thread: f5839,eaa6a4f49ad60bac,start X-Google-Attributes: gidf5839,public X-Google-Language: ENGLISH,ASCII-7-bit From: Barbu_Bogdan@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.photoshop.scripting Subject: Scale Image Algorithm Message-ID: <3bb50248.-1@webx.la2eafNXanI> Date: Tue, 13 Jul 2004 02:39:56 -0700 Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit