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
, 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
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
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
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®
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
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
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
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.
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
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
-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
: 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
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
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get
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
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
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
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
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
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
20 matches
Mail list logo