Are you saying that Though you are writing the next pixel at the same 
coordinates as the previous point, it is being written to the right side of the 
previous pixel ?

I tried the following code where I have ImageDrawPoint() twice on the same 
coordinates and in the final Image I see only one pixel written. So this seems 
to be working fine on Windows OS. Let me know your configuration details, If I 
have understood your question right.

Jayesh Viradiya
Adobe CF Team

<cfset myImage=ImageNew("",200,200)>
<cfset attr = StructNew()>
<cfset attr.width = 10>
<cfset ImageSetDrawingStroke(myImage,attr)>
<!--- Draw the point at (100,100). --->
<cfset ImageDrawPoint(myImage,100,100)>
<cfset ImageDrawPoint(myImage,100,100)>

<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="write" 
destination="C:\ColdFusionCentaur\wwwroot\point.jpg" overwrite="yes">
<img src="point.jpg">



-----Original Message-----
From: Jonathan Larson [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 1:27 AM
To: cf-talk
Subject: Issues with ImageDrawPoint()

Good afternoon everyone.

Over thanksgiving I was intrigued by the image functions that CF8 has
to offer.  So I did a little experimentation project.  For the the
most part, they are terrific! In fact, there is really only one issue
I have with the functionality.

I did a little demo of the ImageDrawPoint function; basically it's
just filling up an a new image with random hex pixels.  The program
works it's wonders.  However, I noticed when I just write a single
pixel (let's say in the middle of an image) it cannibalizes the next
pixel to the right of the one I wrote to and changes it to the same
color as the pixel written to. I emphasize the pixel to the right!
When writing to a pixel that is at the right-most edge, the problem
doesn't happen (seems obvious because there is no pixel to the
right).  I've tried multiple scenarios such as writing to a new image
using ImageNew, uploading an existing image and writing to that, and
I've tried saving to multiple file formats (png, gif, tiff, jpg,
etc).  All have the same problem.  I have anti-aliasing off.  Now this
issue may have to do with the imageWrite and the algorithms it uses to
save the image. Is there a lossless format to save in (I thought tiff
was lossless)?  I'm not an image format junkie so a little help would
be appreciated on that end.

Has anyone else come across this problem?  I have some code upon
request to show you the method I used and what other lurking variables
may exist in my code.

Thanks to all in advance!

(Sorry if this is a repost... Fusion rejected it because I wasn't
subscribed to the list, oops)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316049
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to