Jump to content

Echo Text?


unidox

Recommended Posts

I have an image .gif, with text in it, but I want there to be no text, and echo the text in php.

 

Like say I have a .gif and it says Hello. I want to remove the Hello, so its just the bg. But the bg into a table, and echo out the text with correct font. The font is Bebas, so everyone might not have it. How can I do this?

Link to comment
Share on other sites

Removing text from an image is too hard. First you'd need an algorithm to identify which pixel regions are part of the font and then what you'd like to replace them with (e.g. to match the background)...

 

The CSS shown above will download a locally stored font named garmond, you'll need to find some web fonts, i've never bothered!

Link to comment
Share on other sites

Wait wait wait... Are you saying that you want to use php to remove text from an image? Wow now thats going to take alot of coding. Better bet is to just use phooshop and try to make the image look good! When it comes to images sometimes humans are smarter than php, But not always! lol jk

Link to comment
Share on other sites

Okay thank goodness. I thought you were going crazy trying to take text outta images with php.

 

You should try using

 

ImageCreateFromJPG();

ImageDestroy();

 

I use these functions all the time for messing around with images in PHP, it can add text add text from user input, change bg colors, adjust tint and ect ect...!

Link to comment
Share on other sites

Search PHP.net it requires you to enter your quardenets in Pixels of where you want your text to start and end, Where you want your text positioned, what font, create image or use existing and alot of stuff.

 

http://ca.php.net/manual/en/function.imagecreate.php

 

Thats a direct, its hard to explain cause there are so many factors. its like showing someone how to website. There are so many factors at play that you cant really teach them without writing 1000 lines of text. But luckily php.net has 10000 lines of text so I dont gotta type it. Check it out there!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.