473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

determine text position in image

Hi all
I want to create an online stamp making site. In my site a user select
a template from number of templates for making his stamp. The template
is and image with some graphics and text. Now user can change the text
in template but not the graphics .My requirement is how can i
determine the position of text in form of x,y coordinates using GD
libraries. As there will be number of templates which will be loaded
from admin panel and all templates will be having text at different
locations so i need some dynamic method to know the position of text
and graphic in image
Jul 18 '08 #1
4 1864
sarika wrote:
Hi all
I want to create an online stamp making site. In my site a user select
a template from number of templates for making his stamp. The template
is and image with some graphics and text. Now user can change the text
in template but not the graphics .My requirement is how can i
determine the position of text in form of x,y coordinates using GD
libraries. As there will be number of templates which will be loaded
from admin panel and all templates will be having text at different
locations so i need some dynamic method to know the position of text
and graphic in image
It might help if you tell us the file format the graphics are stored in.
Without that, there is no way to tell.
But in general:
- in case you are using raster formats (gif, png, jpeg): forget it
- in case you are using post script (ps, eps): look into it
- in case you are using vector grafics: dunno, sorry, really

arkascha
Jul 18 '08 #2
On Jul 18, 7:57 am, sarika <sarikason...@gmail.comwrote:
Hi all
I want to create an online stamp making site. In my site a user select
a template from number of templates for making his stamp. The template
is and image with some graphics and text. Now user can change the text
in template but not the graphics .My requirement is how can i
determine the position of text in form of x,y coordinates using GD
libraries. As there will be number of templates which will be loaded
from admin panel and all templates will be having text at different
locations so i need some dynamic method to know the position of text
and graphic in image
Short answer is you can't.

Solution is to build a tool which allows you to through each image and
select the area of the image where the text should appear/be replaced.
Most of the hard waork for this would be in Javascript using floating
layers. Once captured then by all means use PHP to store the data
either externally or, using GD, in the metadata of the image file.

C.
Jul 18 '08 #3
On 18 Jul, 07:57, sarika <sarikason...@gmail.comwrote:
Hi all
I want to create an online stamp making site. In my site a user select
a template from number of templates for making his stamp. The template
is and image with some graphics and text. Now user can change the text
in template but not the graphics .My requirement is how can i
determine the position of text in form of x,y coordinates using GD
libraries. As there will be number of templates which will be loaded
from admin panel and all templates will be having text at different
locations so i need some dynamic method to know the position of text
and graphic in image
Why not store the graphic with no text and in a table store the name
of the graphic plus the position whre you will want to put the text.
Then you can put the actual text there "on the fly" before sending the
complete image to the browser?
Jul 18 '08 #4
Captain Paralytic wrote:
On 18 Jul, 07:57, sarika <sarikason...@gmail.comwrote:
>Hi all
I want to create an online stamp making site. In my site a user select
a template from number of templates for making his stamp. The template
is and image with some graphics and text. Now user can change the text
in template but not the graphics .My requirement is how can i
determine the position of text in form of x,y coordinates using GD
libraries. As there will be number of templates which will be loaded
from admin panel and all templates will be having text at different
locations so i need some dynamic method to know the position of text
and graphic in image

Why not store the graphic with no text and in a table store the name
of the graphic plus the position whre you will want to put the text.
Then you can put the actual text there "on the fly" before sending the
complete image to the browser?
Because the captcha images he is trying to crack don't work like that?

;-)
Jul 18 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Werner Partner | last post by:
I'm looking for something like that: http://www.sonoptikon.de/praxis-mt/test.php The text should have a certain indent, and from the left border should come a "marker" which goes over the text...
10
by: Marc Jennings | last post by:
Hi there, Can anyone point out any really obvious flaws in the methodology below to determine the likely encoding of a file, please? I know the number of types of encoding is small, but that is...
0
by: Assaf | last post by:
Hi. Is there a way to determine the position (top, left) and dimensions (width, height) of a an image on a form? Our app lets users embed image files from a library folder by specifying their...
7
by: ashkaan57 | last post by:
Hi, I am new to CSS. I want to have an image (170x250) centered and have some text to the right of it, starting from top of the image. I have: ..info { position: absolute; top:100px;
1
by: Line 1 | last post by:
Hello!! Can you help me with my CSS problems? I have created a page that overlays text on an image. the problem is that it is leaving all this space at the bottom of background image that I also...
2
by: george.leithead | last post by:
Hi all, I have a very strange problem! In following Web page (which is generated from a CMS System), the navigation to the left 'dissapears' when you roll the mouse over the links? It does not...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
2
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.