Re: Centering text written on an image

2008-08-26 Thread Kevin Roche
I think you have to figure out the offset, and start from there. So, you'll need to determine the approximate width in pixels of your text string, But the quetion is how? How can I find the width of the string? I tried making a table of widths and that does not work really. For example with

RE: Centering text written on an image

2008-08-26 Thread Rick Faircloth
, August 26, 2008 6:04 AM To: CF-Talk Subject: Re: Centering text written on an image I think you have to figure out the offset, and start from there. So, you'll need to determine the approximate width in pixels of your text string, But the quetion is how? How can I find the width of the string

Re: Centering text written on an image

2008-08-26 Thread Azadi Saryev
that's exactly what i am doing for my client who wants to create custom ads for their products (tours). my situation is easier in a way that the ads are pre-st size and i have a transparent .png of same size to put text on, add shadows etc, and then overlay it over the product image. easy as pie

Re: Centering text written on an image

2008-08-26 Thread Raymond Camden
You will also find related functions in ImageUtils as well. If I remember right we (CFC was made by Ben Nadel, myself, and others) also have a generic 'getSize' func for text as well. Either way though, the CFC makes this operation trivial. On Fri, Aug 22, 2008 at 1:03 PM, Chris Blackwell [EMAIL

Re: Centering text written on an image

2008-08-26 Thread Kevin Roche
Is there a way to add an extra step or two and make an image of just your text, determine that width which gives you your string width I have no Idea how to do that. Can you tell me how to find the width of the text? ~| Adobe®

Re: Centering text written on an image

2008-08-26 Thread Raymond Camden
Yes, again, the CFC has a way to get the height/width of _just_ a textual component. On Tue, Aug 26, 2008 at 7:42 AM, Kevin Roche [EMAIL PROTECTED] wrote: Is there a way to add an extra step or two and make an image of just your text, determine that width which gives you your string width I

RE: Centering text written on an image

2008-08-26 Thread Rick Faircloth
Subject: Re: Centering text written on an image Is there a way to add an extra step or two and make an image of just your text, determine that width which gives you your string width I have no Idea how to do that. Can you tell me how to find the width of the text

RE: Centering text written on an image

2008-08-26 Thread Rick Faircloth
without resorting to an image, given all the variables in font, size, etc. Rick -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 9:17 AM To: CF-Talk Subject: Re: Centering text written on an image Yes, again, the CFC has a way to get

Re: Centering text written on an image

2008-08-26 Thread Claude Schneegans
how does the CFC measure the height and width of text without resorting to an image Any decent text/Image processing library will provide some function to calculate the physical length of a string given a specific font and size. And I'm pretty sure Ray's CFC is using a decent library.

Re: Centering text written on an image

2008-08-26 Thread Kevin Roche
What I'm thinking is trying to avoid determining the text width by creating an image of just the text and measuring that. Yes but how? When you create an image in ColdFusion you have to give it a width and a height. If you don't you get an error when you try and use it: The image on which the

Re: Centering text written on an image

2008-08-26 Thread Raymond Camden
It's using a bunch of Java code from an Adobe blogger (used with permission). I forget the name, but it should be credited in the CFC itself. I definitely can't take credit for the code, although I think I handled the wrapping up in the method. That counts for something, right? ;) Anyway, that

RE: Centering text written on an image

2008-08-26 Thread Rick Faircloth
-Talk Subject: Re: Centering text written on an image how does the CFC measure the height and width of text without resorting to an image Any decent text/Image processing library will provide some function to calculate the physical length of a string given a specific font and size

RE: Centering text written on an image

2008-08-26 Thread Rick Faircloth
: Tuesday, August 26, 2008 10:07 AM To: CF-Talk Subject: Re: Centering text written on an image What I'm thinking is trying to avoid determining the text width by creating an image of just the text and measuring that. Yes but how? When you create an image in ColdFusion you have to give

RE: Centering text written on an image

2008-08-22 Thread David Moore, Jr.
Are you doing this dynamically using cfimage or Photoshop or just how? ~David Subject: Centering text written on an image From: [EMAIL PROTECTED] To: cf-talk@houseoffusion.com Date: Fri, 22 Aug 2008 11:09:37 -0400 Hi, I want to add some text to an image but have it centered rather than left

Re: Centering text written on an image

2008-08-22 Thread Kevin Roche
I am using ColdFusion to write some text on an image and I don't know in advance what the string is going to be so I can't guess where to start writing it. Is there a way to say write this text around a particular point? I can check from the image how wide it is and work out where the centre

Re: Centering text written on an image

2008-08-22 Thread Alan Rother
Hey Kevin, I ran into a similar problem. The main issue you are going to face is not knowing how long the final rendered string will be once it's turned into a graphic. So far I've found no solution using the native CF8 image tools. If you really HAVE to accomplish this then the only (easy) way

RE: Centering text written on an image

2008-08-22 Thread Dave Watts
I am using ColdFusion to write some text on an image and I don't know in advance what the string is going to be so I can't guess where to start writing it. Is there a way to say write this text around a particular point? I can check from the image how wide it is and work out where

RE: Centering text written on an image

2008-08-22 Thread David Moore, Jr.
Kevin Wrote I am using ColdFusion to write some text on an image and I don't know in advance what the string is going to be so I can't guess where to start writing it. Is there a way to say write this text around a particular point? I can check from the image how wide it is and work

Re: Centering text written on an image

2008-08-22 Thread Chris Blackwell
Hi, I want to add some text to an image but have it centered rather than left justified. Does anyone know how to do that? Kevin Roche http://imageutils.riaforge.org/ - getCenteredTextPosition() ~| Adobe® ColdFusion® 8