Hello, I've been trying to come up with a script using GD library to create an image and upload it straight to ImageShack using their API. I am using ImageShack class written by Elliott C. Back, which works flawlessly unmodified by uploading image from file. But when I try to modify one simple line of CURL Options code, it breaks and won...
I need to create a watermark apply it on a picture and save it with a different name . The current script works pretty well but the only problem is that I need to increase the size of the "sample text" and change the background from black to white . I tried different scenarios , changed the opacity but still can't change the background c...
i seem to be too dumb for this :-)
i have an image say
x=200
y=200
i want the image to stay the same but include a footer watermark lets say a.jpg which has a height of 20
so i want
a final image of 220 and y 200
i tried it this way but it wont work
$newimage=imagecreatetruecolor($width,$height+25);
imagecopy($newimage, $this->paren...
A couple of months ago I enabled GD on localhost to play around with it a bit, used various scripts found online to get a better understanding of what it does, all good and well.
But now I feel like I'm descending into insanity here because when trying to repeat the above with the exact same scripts I keep getting header errors, both on...
In PHP GD how can you convert a truecolor image to a palette without losing any colors. With imagetruecolortopallete it doesn't work. I have a function that runs through all the colors and filters them (eg. grayscale). and It doesn't retain all colors, such as this picture of a Lamborghini-
Picture
This is my code
$im = imagecreat...
I make a php script that receive from POST 4 image, than store them and create the thumbs trought GD php library. The problem is that it works only if i load 2 photos 4mb each (or 4 photos 2 mb each, or less; in fact max 8 mb). why? i check the value of memory_limit (64mb), upload_max_filesize (25mb) and max_file_uploads (120secs), and i...
This is a beautiful image. I'm wondering how it can be generated programmatically with an image-processing library like imagemagick or gd?
http://robertbasic.com/img/sign-letters.gif
My general idea is that the frame itself could be defined separately, but is there way to fill that frame with letters in the same way they're doing it...
I am using this code:
<?php
list($width, $height, $type, $attr) = getimagesize("terrain.png");
$canvas = imagecreatetruecolor($width, $height);
$src = imagecreatefrompng("terrain.png");
if($_GET['glass'] == 1){
$src2 = imagecreatefrompng("rock.png");
}
imagecopymerge($canvas, $src, 0, 0, 0, 0, $width, $height, 100);
if($_GET[...
I'd like to take an image and turn the corners over to make a box (like a canvas painting)
i have gd library, imagemagick installed on the server and imagick php extension installed.
is it possible? any help appreciated
...
I'm trying to screen cap different sites as I do some automated browsing to keep a reference image. I'm on a Windows 7 machine and using PHP 5.3.2 from the DOS prompt commandline to run a simple program to open a list of URLs in IE, capture the image, and quit.
It's the standard code...
$browser = new COM("InternetExplorer.Application"...
I'm using gd in PHP to add some text to a gif image from Illustrator. I've added text and drawn figures, and no matter how I specify the color, they all show up as gray (I'm guessing 50% gray).
I opened the image in MS Paint and re-saved it as a gif. When I did that, it gave a warning of color loss. However, the colors show up correctl...
Is there a way to place an image on the top of an other to produce one image?
...
Hello,
I have no idea how to resize image in PHP, my code is:
for ($index = 1; $index <= 2; $index++) {
if (!empty($_FILES["pic$index"]["name"])) {
$ext = substr($_FILES["pic$index"]["name"], strrpos($_FILES["pic$index"]["name"], '.') + 1);
$dir = "../gallery/$mkdir";
HERE I NEED THE RESIZE OF THE TMP FIL...
I'm using imagecopyresampled to merge images together. Its working perfectly except some of the colors are strangely allocated in the wrong places. Such that hues of one part of the image appear elsewhere.
Does anyone have a fix for this?
...
I'm almost positive that there is a stupid reason this is not working, but I just can't figure this one out. I'm just trying to print out some text as a graphic with imagettftext, but I can't get the words to display. This is on a GoDaddy server, so I don't control everything, but here are the specs from phpinfo():
PHP Version 5.2.14...
After working with a lot of GD recently (for some fairly large scale projects for work) I had been dealing with RGB codes that I am not so accustomed to.
My co-workers and I had been suffering some what to find a good method to do this without resorting to a makeshift 'hex to rgb' function with arrays for just a simple function.
There...
I am getting this error Could not find/open font When trying imagettftext() in PHP.
The font file is there. What is the problem?
...
I have a dynamic image which uses GD to throw in some overlay images/text. This would be dynamicImage.php?firstName=Bob&lastName=Sacamano. I want to be prompted to download that file, so I created a download.php file to act as the middle-man:
//Get the Arguments
$file .= "firstName=".filter_var($_GET['firstName'], FILTER_SANITIZE_STRING...
What are the best practices on image handling on a php driven web site when several versions of the same image are required (different sizes), bear in mind it's a high load website:
Upload and automatically create all sizes needed
Upload a single size image then call a single script which based on a parameters resizes/crops and display...
I'm creating a dynamic class to generate various images.
ImagesUtils.php
<?php
class ImagesUtils
{
private $nombre_imagen = null;
private $imagen = null;
private $extension = null;
private $directorio = null;
private $width = null;
private $height = null;
private $tipo = null;
private $final_width = nu...