PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Introducción> <read_exif_data
Last updated: Fri, 26 Dec 2008

view this page in

Image Processing (GD)



Introducción> <read_exif_data
Last updated: Fri, 26 Dec 2008
 
add a note add a note User Contributed Notes
GD
Thomas
10-Dec-2008 02:05
You know, maybe this goes without saying, but I thought I would drop a note in here.  When developing code to resize images, it is best not to use GD.  When using the current GD methodologies, you are reading content from an image and manipulating it.  By then writing that content to a brand new file, you are losing the EXIF data.

For purposes when you want to retain EXIF data, it is recommended that you compile in and use the PECL Imagick extension.  It has great resizing methods built right in and the EXIF data is retained.
chocobo_bu at hotmail dot com
23-Oct-2008 09:07
If you want to merge gif animate you must split image to multiple frame and merge it frame by frame.
Finally you just merge multiple frame back to gif animate it completed. :)

learn more about this case

http://www.myfineday.com/2008/10/02/php-how-to-merge-gif-animate/
code at ashleyhunt dot co dot uk
23-Oct-2008 06:02
I have been looking to send the output from GD to a text string without proxying via a file or to a browser.

I have come up with a solution.

This code buffers the output between the ob_start() and ob_end() functions into ob_get_contents()

See the example below

<?php
// Create a test source image for this example
$im = imagecreatetruecolor(300, 50);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5'A Simple Text String', $text_color);

// start buffering
ob_start();
// output jpeg (or any other chosen) format & quality
imagejpeg($im, NULL, 85);
// capture output to string
$contents = ob_get_contents();
// end capture
ob_end_clean();

// be tidy; free up memory
imagedestroy($im);

// lastly (for the example) we are writing the string to a file
$fh = fopen("./temp/img.jpg", "a+" );
   
fwrite( $fh, $contents );
fclose( $fh );
?>

Enjoy!
Ashley

Introducción> <read_exif_data
Last updated: Fri, 26 Dec 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites