>- see footer for list info -<
Whilst you're there:

--------------
Trying to resize a PNG with the following code and the image linked below
and it's coming out all screwy. Any ideas as to why this is happening? The
image is from a jQuery plugin so I'm not sure how it was created.

Source: http://www.halestorm.co.uk/images/growl-tick.png

Resized: http://www.halestorm.co.uk/images/growl-tick-resized.png

Code:

<cfset img_path = ExpandPath(".\growl-tick.png")> <cfset img_dest =
ExpandPath(".\growl-tick-resized.png")>

<cfset img = ImageRead(img_path)>
<cfset ImageScaleToFit(img, 200, "")>
<cfset ImageWrite(img, img_dest, 1)>
<cfimage action="WRITETOBROWSER" source="#img#">

Anything about PNGs I need to know in regards to resizing them in CF?

Cheers.

Adrian
--------------

> -----Original Message-----
> From: [email protected] [mailto:dev-
> [email protected]] On Behalf Of Rich Wild
> Sent: 11 March 2009 13:32
> To: Coldfusion Development
> Subject: [CF-Dev] Re: odd CF8 image error
> 
> >- see footer for list info -<
> found it (eventually)
> 
> for future reference:
> 
> bug form for CF
> 
> http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=7
> 
> On Wed, Mar 11, 2009 at 1:12 PM, Rich Wild <[email protected]> wrote:
> 
> > Does anyone know of a quick way in which I can log a bug with Adobe
> about
> > this without having to jump through hoops?
> >
> > In the meantime, I've had to go back to imagemagick. It doesn't have
> any
> > problems with the same image that cfimage is choking on.
> >
> >
> > On Tue, Mar 10, 2009 at 7:01 PM, Rich Wild <[email protected]>
> wrote:
> >
> >> Has anyone seen this error before when using imagewrite on CF8:
> >>
> >> Error Occurred While Processing Request      X Resolution    X
> Resolution
> >>
> >> ???
> >>
> >> many thanks for being helpful CF.
> >>
> >> I'm reading an image, using imageScaleToFit() on it, and then trying
> to
> >> imageWrite()
> >>
> >> Here's the code (the file exists in the following dir)
> >>
> >> image =
> >> imageread(expandpath('images/items/originals/18th-Century-dresser-
> 2000713518.JPG'));
> >>
> >> imageScaleToFit(image,1000,"");
> >> imageWrite(image,expandpath('18th-Century-dresser-2000713518.JPG'));
> >>
> >> doesn't appear to be anything wrong there....
> >>
> >> If I dump 'image' after the imageread I get:
> >>
> >> alpha_channel_support NO  alpha_premultiplied NO  bits_component_1 8
> >> bits_component_2 8  bits_component_3 8  colormodel_type
> ComponentColorModel
> >>  colorspace Any of the family of RGB color spaces
> num_color_components 3
> >>  num_components 3  pixel_size 24  transparency OPAQUE
> >> as well as height and width attributes of 1776 and 1501
> respectively.
> >>
> >> What's odder is that if I open the image in photoshop and then save
> it
> >> out, I get no error when I try the new file + the dump on 'image'
> gives me
> >> exactly the same attributes as the previous pre-photoshop version.
> >>
> >> wha? All the image attributes look ok to me - no CMYK etc.
> >>
> >> Anyone any clues?


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to