Jump to content

Recommended Posts

Hello,

 

I need pointed in the right direction, What I am trying to do is take an 468x100 image, and add 1-10 small images and specified names onto it, the image are hosted on my server. I would also like them to be saved as .PNG image files, with a specified name

 

Ugly looking example of what I want it to do

 

badexample.jpg

 

If there is anything else needed to point me in the right direction ask i'll try to explain  :P

Here some choice from the manual

imagecreatefromgif

imagecopymerge

imagettftext

imagepng

 

And here a basic sample

<?php
// Create image instances
$dest = imagecreatefrompng('background.png');
$src = imagecreatefrompng('sprite.png');

// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = 'arial.ttf';

//colour
$black = imagecolorallocate($dest, 0, 0, 0);

// Add the text
imagettftext($src, 20, 0, 10, 20, $black, $font, $text);

// Copy and merge
imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75);


imagepng($dest,"newimage.png");
imagedestroy($dest);
imagedestroy($src);
?>

 

Hope that helps

GOTTA CATCH 'EM ALL, POKEMON!

Sorry. Theme song moment.

 

 

I have nothing to contribute, I just thought I'd throw some thumbs up. Sorry to intrude! :D

 

lmao, Nice.

 

 

and Ty, MadTechie, I am going to play with that code and those commands, hopefully I can get it  :D

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.