Questions tagged [gd2]

GD2 as well as GD are open source code libraries for the dynamic creation of images by programmers. GD2 is the improved version of GD and a widely used standard. For example, GD2 in included in PHP 5.

GD2 as well as are code libraries for the dynamic creation of images by programmers. GD2 is the improved version of and a widely used standard. For example, GD2 in included in .

Useful Links:

109 questions
1
vote
1 answer

Codeigniter Image Resize and Crop Error on big images

Im just using a basic PHP server with 8GB ram, Its just running a LAMP server. I have a codeigniter V3 running and I could upload small images and crop resize them on the fly easy. But if I upload images bigger than 540 x 540 then I get the…
Sahan
  • 1,422
  • 2
  • 18
  • 33
1
vote
2 answers

Image cannot resize using PHP

I'm trying to resize an image that I copy from Flickr. But it seems I'm getting the original size itself. Here is my code: $img = Input::get('FlickrUrl'); $filename = gmdate('Ymdhis', time()); copy($img,…
user1012181
  • 8,648
  • 10
  • 64
  • 106
1
vote
3 answers

Letter placement error with GD2, TTF and PHP

Some time ago I made a script that takes some text and returns it as an image, and worked flawlessly. But I'm not sure since when a weird bug started to happen. The letters that have a (my apologies to the font geeks) "glyph" on the left get pushed…
Javier Parra
  • 2,020
  • 2
  • 18
  • 32
1
vote
1 answer

Display multiple variables in an image

I'm trying to use multiple variables as the string inside an image generated in PHP, but I keep getting the following error: Parse error: syntax error, unexpected '' - '' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\Projects\scrobbl.in\image.php…
Cody
  • 219
  • 2
  • 12
1
vote
1 answer

GD2: Resize image one, merge with image two

So, I have a form where people can upload images via AJAX. Once the image has been uploaded they can choose from a list with another image (.png) which they can drag and drop over the first image. Once they're happy with the result, pressing a…
faerin
  • 1,915
  • 17
  • 31
1
vote
1 answer

Mavericks XAMPP install PHP GD2 extension

I am using XAMPP for my PHP development on Mavericks. I am using PHPExcel for excel manipulations. The problem is PHPExcel requires PHP GD2 extension. Please guide me how to install this extension on my MAC OSX.
Irfan DANISH
  • 8,349
  • 12
  • 42
  • 67
1
vote
1 answer

CodeIgniter Image Manipulation JPG Error

I have wrote a system for my personal website with CodeIgniter and used GD2 library to manipulate images according to my needs. It worked just fine when on localhost and a free hosting that I used for testing. But now that I am on a paid hosting…
SuperioREX
  • 257
  • 1
  • 2
  • 9
1
vote
1 answer

PHP + GD2: How can change resolution of image?

I'm using gd2 lib to work with images. I need to change resolution of image, still I cant find a method for that in a list of methods. How that can be done? Thank you in advance
Eugeny89
  • 3,797
  • 7
  • 51
  • 98
1
vote
1 answer

Php Resizing image increase image size

I'm creating thumnails of uploaded file. if image width and height are greater than 200 than then i re size them to 200px. Here is code i used to do that: if (file_exists($old_file)) { $path_parts = pathinfo($old_file); $extension =…
Ravikumar Sharma
  • 3,678
  • 5
  • 36
  • 59
1
vote
2 answers

php - optimize image file size

I'm making a web application for online comic. My biggest difficulty things are how to save the disk space when store the images (i don't have money ^^). I try to use GD2 to resize the image, convert to jpg, reduce the qualities...but the file size…
azure313
  • 49
  • 3
1
vote
1 answer

PHP GD2 Images not printing

Recently we launched a in store activation that has you take a photo with a Galaxy Tab 2 and then feeds it to our central server. This is Done with Phonegap. On the server we use PHP and GD2 to generate the images. Everything works on the server and…
1
vote
1 answer

Read raw color data from PHP's .gd or .gd2 format?

In another question I saw some source, that would export an image into .gd or .gd2 format and then read raw pixel color data from the generated source. Is this possible? Where can I find more information about these formats, or any other, that…
Tony Bogdanov
  • 7,436
  • 10
  • 49
  • 80
1
vote
0 answers

gd2 not showing in phpinfo, is showing in php -i

I'm trying to get the gd2 extension to work on a WAMP stack (Win7(x64), Apache 2.4, PHP 5.3.26) I've enabled extension=php_gd2.dll in php.ini and restarted Apache. I believe my extension directory is reachable as I'm able to load other extensions…
nao
  • 46
  • 1
  • 5
1
vote
4 answers

How to blend images using Photoshop 'darker color' blend mode?

I need to display user-uploaded logos on a background-image. The background of the logo's should be transparent. The problem is that most users have no knowledge of how to make their images transparent, let alone how to use alpha-transparency, so…
Dylan
  • 9,129
  • 20
  • 96
  • 153
1
vote
2 answers

PHP: How to set part of png file as transparent?

I have png file and I want to have some part of this image (rectangle) to be transparent. forexample something like this: pseudocode: where x, y, $width,…
tomas.teicher
  • 913
  • 3
  • 13
  • 26