For a website I run, users can upload pictures they've drawn to a gallery. We create a thumbnail and a small view of that image to display to other users (clicking the small view image shows the full sized image).
With this in mind, I created a very simple resize script. In most cases this script works perfectly. However, I've come a...
I'm using the latest version of timthumb for creating thumbnails of the images on the fly.
My local server for development is on Windows Vista, Apache 2.2, php 5.2.13,
gd library is enabled with full support:
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Vers...
Hi,
Is it possible the saved text with different styles and colors in the image?
...
Hi,
for example i have this html code:
<p><strong>Text text.</strong></p>
<p><span style="font-size: 14pt;"><span style="background-color: #ff0000;">Text text...</span></span></p>
Possible write this text with this style on the image (with php GD)?
Thanks
...
I'm writing a fastcgi app for my website in C.
How do I use GD to generate a CAPTCHA image?
I searched for some stuff on google in vain (still search is going on), but it would be nice if someone could give me the basic idea about the procedure.
For random numbers, I will use nanoseconds as seed (or use that itself).
Thanks in advanc...
Hi,
I'm trying to find a real time image processing tool that can do image resizing, image/text overlaying and format converting. I found some related posts but they don't quite answer my question.
Prioritized criteria for the tool:
The processing time needs to be less than 100 ms.
The size of output image needs to be small. It needs...
I'm starting to work on a project that will require a lot of image manipulation. I remember getting the impression in the past that imagemagick was somehow better than GD.
Since I have GD only, this will require me to install imagemagick, and I want to make sure it's worth the trouble. Can someone clarify if it's true that imagemagick ...
Any PHP functions that deal with JPEGs don't seem to be working on my server.
This code:
<?php
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
header('Content-type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
?>
creates an e...
I have a dynamic thumbnail script I found laying around the web and tweaked a bit. One of the things I added was a caching mechanism. Whenever a new thumb is generated, it is saved to disk, and the disk copy will be used if the same thumbnail (with all the same options) is requested again.
A snippet:
// name of cached file
$thumb_...
I am currently working on a website and lately have been using GD with PHP to automatically create transparent images that consist of text for use with navigation, headers, etc on the website. It saves me a lot of time in Photoshop plus I can change the text on the buttons instantly when needed.
Well I have hit a dead end here. I foun...
Hello world.
I am trying to create the silhouette of PNG image with transparencies.
Here is my code
//file that i am working with
$file='http://www.google.com/mapfiles/turkey.png';
$im =imagecreatefrompng($file);
imagealphablending($im, false);
imagesavealpha($im, true);
$imw =imagesx($im);
$imh =imagesy($im);
//turkey body ...
Having until now only used PHP's gd image library to resize, crop and greyscale images I'm currently struggling to find a way to simulate what happens when, in Photoshop, you place a coloured layer over a greyscale image and select 'multiply' from the layer effects menu. Or, as my old print lecturer would explain it, I need to make a duo...
Hi all. I want to know how to find the percent of color in a gradient image with library GD of php. Please help me
...
I am struggling with PHP's GD library.
I have written a script called foo.php which outputs a png:
header('Content-type:image/png');
$img = imagecreatefrompng($url) or die('bad url:'.$url);
imagepng($img);
imagedestroy($img);
It works fine. Its purpose is to accept a GET parameter and then spit out the appropriate graph:
(e.g.) fo...
How would you get the colors from an allocated color
something like...
$col = imagecolorallocate($im, 255, 50, 5);
//A fake function - rgbfromallocate (that I wish I knew)
$rgb = rgbfromallocate($col);
print $rgb['r'];//255
print $rgb['g'];//50
print $rgb['b'];//5
...
I was wondering if someone can provide me with a tutorial or source code of a way to make it so if people are leeching my sites images and embedding them in their forums or sites it will show a watermark, but if they view it on my site their wont be a watermark?
...
Hi All,
i want to know how can i generate image dynamically from content and also from existing image
as i know we can add sting to dynamically generated image in php
so actually i want to make image that contains existing image as well as content.
...
What is the best way to replace transparent colors with white in gif and png images with php?
// get transparent color indexes
$trsp = ImageColorsForIndex($image, ImageColorTransparent($image));
// get transparent color set
$delete = imagecolorallocate($image, $trsp['red'], $trsp['green'], $trsp['blue']);
// replace
imagecolorset($imag...
How could you distort an image with PHP GD from this...
To this...
using only the PHP GD library.
I don't want to use a function someone else made I want to UNDERSTAND what's going on
...
Is there a way with PHP GD to draw a star using imagefilledpolygon?
Where would the points be plotted?
I believe it involves sine and cosine because...
How can I relate those points to the center using sine and cosine in GD?
...