[cfaussie] Image functions with transparent png images

2011-12-19 Thread Steve Onnis
I am having this issue which i am sure people have had in the past so i am
hoping for some advice as to how to get around it.

 

I am uploading a transparent png image file with the following process :- 

 

1.   Upload file

2.   Read file

3.   Store file in memory as binary

4.   Delete original file

5.   Output image  to browser

 

Now if i use the writetobrowser action the image displays as its proper
transparency but if i use say cfcontent type=image/png
variable=#ToBinary(ToBase64(imageVar))# / then the image messes up and
displays with its colors all inverted and no transparency.

 

Does anyone know how i can get around this?  I need the image to display
with its transparency.  From what i can see, even if i pass the png content
type in, the browser is seeing it as a JPEG image.

 

Any suggestions?

 

Steve

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Image functions with transparent png images

2011-12-19 Thread Steve Onnis
Thought i would push this one back out into the ether to see if anyone had
any ideas...

 

From: Steve Onnis [mailto:st...@cfcentral.com.au] 
Sent: Tuesday, 20 December 2011 3:46 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Image functions with transparent png images

 

I am having this issue which i am sure people have had in the past so i am
hoping for some advice as to how to get around it.

 

I am uploading a transparent png image file with the following process :- 

 

1.   Upload file

2.   Read file

3.   Store file in memory as binary

4.   Delete original file

5.   Output image  to browser

 

Now if i use the writetobrowser action the image displays as its proper
transparency but if i use say cfcontent type=image/png
variable=#ToBinary(ToBase64(imageVar))# / then the image messes up and
displays with its colors all inverted and no transparency.

 

Does anyone know how i can get around this?  I need the image to display
with its transparency.  From what i can see, even if i pass the png content
type in, the browser is seeing it as a JPEG image.

 

Any suggestions?

 

Steve

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Image functions with transparent png images

2011-12-19 Thread Zac Spitzer
have you tried writing the file out to the filesystem first with a
.png extension?

personally I hate the dependence on filenames for setting file types with the
image support in CF, it's really annoying

z

On Tue, Dec 20, 2011 at 1:53 PM, Steve Onnis st...@cfcentral.com.au wrote:
 Thought i would push this one back out into the ether to see if anyone had
 any ideas...



 From: Steve Onnis [mailto:st...@cfcentral.com.au]
 Sent: Tuesday, 20 December 2011 3:46 AM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Image functions with transparent png images



 I am having this issue which i am sure people have had in the past so i am
 hoping for some advice as to how to get around it.



 I am uploading a transparent png image file with the following process :-



 1.   Upload file

 2.   Read file

 3.   Store file in memory as binary

 4.   Delete original file

 5.   Output image  to browser



 Now if i use the “writetobrowser” action the image displays as its proper
 transparency but if i use say cfcontent type=image/png
 variable=#ToBinary(ToBase64(imageVar))# / then the image messes up and
 displays with its colors all inverted and no transparency.



 Does anyone know how i can get around this?  I need the image to display
 with its transparency.  From what i can see, even if i pass the png content
 type in, the browser is seeing it as a JPEG image.



 Any suggestions?



 Steve

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Image functions with transparent png images

2011-12-19 Thread Steve Onnis
Yeah i have and once i write it, the transparency is fine, even the tmp file
cf creates when it uses the cfimageservlet works fine.  I don’t want to
write it though. There are other processes that i need to run before i fully
commit it to the file system which is why i am wanting to do this

-Original Message-
From: Zac Spitzer [mailto:zac.spit...@gmail.com] 
Sent: Tuesday, 20 December 2011 1:56 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Image functions with transparent png images

have you tried writing the file out to the filesystem first with a
.png extension?

personally I hate the dependence on filenames for setting file types with
the
image support in CF, it's really annoying

z

On Tue, Dec 20, 2011 at 1:53 PM, Steve Onnis st...@cfcentral.com.au wrote:
 Thought i would push this one back out into the ether to see if anyone had
 any ideas...



 From: Steve Onnis [mailto:st...@cfcentral.com.au]
 Sent: Tuesday, 20 December 2011 3:46 AM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Image functions with transparent png images



 I am having this issue which i am sure people have had in the past so i am
 hoping for some advice as to how to get around it.



 I am uploading a transparent png image file with the following process :-



 1.   Upload file

 2.   Read file

 3.   Store file in memory as binary

 4.   Delete original file

 5.   Output image  to browser



 Now if i use the “writetobrowser” action the image displays as its proper
 transparency but if i use say cfcontent type=image/png
 variable=#ToBinary(ToBase64(imageVar))# / then the image messes up and
 displays with its colors all inverted and no transparency.



 Does anyone know how i can get around this?  I need the image to display
 with its transparency.  From what i can see, even if i pass the png
content
 type in, the browser is seeing it as a JPEG image.



 Any suggestions?



 Steve

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Image functions with transparent png images

2011-12-19 Thread Andrew Scott
Steve,

My guess would be that the cfcontent is using the internal image handling,
which does seem kinda strange, but as we all know the internal image
handling in CF will not handle aRGB images.

It looks like your best option would be the write to browser.

-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543



On Tue, Dec 20, 2011 at 2:02 PM, Steve Onnis st...@cfcentral.com.au wrote:

 Yeah i have and once i write it, the transparency is fine, even the tmp
 file
 cf creates when it uses the cfimageservlet works fine.  I don’t want to
 write it though. There are other processes that i need to run before i
 fully
 commit it to the file system which is why i am wanting to do this



-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.