Все вопросы: [gd]

113 вопросов

похожие теги: php-gdgd-graph
1
голосов
3ответов
3850 просмотров

php imagejpeg mime type

I am using php's imagejpeg to save a GD image resource to a file, doing this: imagejpeg($im, '../images/' . $image_id . '.jpg'); It works fine, but according to my browser, it tries to read the file as text/plain: Resource interpreted as image but transferred with MIME type text/plain. I...

2
голосов
2ответов
2181 просмотров

PIL vs Python-GD for crop and resize

I am creating custom images that I later convert to an image pyramid for Seadragon AJAX. The images and image pyramid are created using PIL. It currently take a few hours to generate the images and image pyramid for approximately 100 pictures that have a combined width and height of about 32,00...

0
голосов
3ответов
510 просмотров

PHP - Bug in polygon GD library?

I have run into some trouble with the gd library's imagefilledpolygon(). For some reason some of my lines were ending up 1px out of place so I decided to debug it using imagepixelset to set the colour of my shapes points to red. alt text http://www.degreeshowcase.com/other/1.gif if you look at ...

6
голосов
2ответов
16115 просмотров

PHP - Replace colour within image

I hope someone can help, I have made a script that masks images... however it is reliant on a colour to mask with ( 'green screen' style). The trouble is if the image that I am masking contains that colour it is ruined. What I am looking to do is prior to masking the image replace any occurance...

4
голосов
2ответов
2766 просмотров

PHP - Mask polygon over image

Hi Everyone (this is my first post), I am trying to figure a way of cropping a polygon out of an image. I have been reading other similar code. It seems that most code is based around the following process: Resize the image to fit the width and height of the polygon shape, Create a blank image...

1
голосов
7ответов
6549 просмотров

PHP imagegrabwindow GD Library returns only black images

I am hoping that there is someone that can help me and many others with this problem... I want to create a screenshot of a website using the imagegrabwindow function part of php and the GD library After spending the whole day implementing the code I finally can capture the image and save it to ...

40
голосов
3ответов
69171 просмотров

I have a base64 encoded png, how do I write the image to a file in PHP?

What's the proper way in PHP to create an image file (PNG), when I have the base64 encoding? I've been playing around with: file_put_contents('/tmp/'. $_REQUEST['id'].'.png', $_REQUEST['data']); do I need to decode? should I be using the gd library?

3
голосов
2ответов
8888 просмотров

PHP GD image perspective

Hi is it possible to transform an images perspective. so it's new shape is an isosceles trapezoid? I saw a solution using Imagick, but that would involve possibly rewriting my entire image manipulation script... (not to mention learning, of which i'm allergic)

1
голосов
1ответов
638 просмотров

php gd: when i crop images through php some images come out smushed

here is the website im talking about http://makeupbyarpi.com/portfolio.php you'll notice some of the images are smushed width-wise. the code i used is this: $width="500"; $height="636"; $img_src = $_FILES['galleryimg']['tmp_name']; $thumb = "../gallery/".rand(0,100000).".jpg"; //Create...

4
голосов
3ответов
10590 просмотров

Possible to add background color to transparent image using GD and PHP

I have the thumbnail creation class written with php language using GD. I want to know is when i upload the transparent image which is png or gif, can i be able to put background in that thumbnail image ? If that's possible, please kindly guide me how. Thanks.

1
голосов
3ответов
2780 просмотров

What is the fastest way to do image rotation in PHP without using GD's imagerotate?

I do not have the ability to use PHP's GD imagerotate() function, so I need to find another solution. I used the rotateImage() method found in the comments of the imagerotate() PHP help page, but it is very slow on large images. I am horrible at image math, and am having a hard time formulating ...

0
голосов
3ответов
284 просмотров

Generate image of PHP output

I want to experiment with creating images/thumbnails of PHP output. A place where one would use this is in a CMS with various modules, and then have a thumbnail of how the output of how each module looks. This should include images and all. Any tips/ideas how I would go about doing this?

0
голосов
2ответов
453 просмотров

ie6 - gd and php image outputting

i'm trying to show image with grayscale-filter. Here is my code: $images = glob('gallery/*small*'); shuffle($images); array_splice($images, 3); $imgHandles = array(); $imgBuffered = array(); for( $i = 0; $i < 3; $i++) { $imgHandles[$i] = imagecreatefromstring( file_get_contents($images[...

0
голосов
1ответов
1548 просмотров

Loading Images in GD

I have to work with different kinds of images with PHP&&GD. The images have extensions like png, jpg and other. How can i upload them into resources. For example, there is function CreateImageFromJPEG, but I'll not be able to load other types of images. How can I write template for all t...

1
голосов
3ответов
924 просмотров

Automatically align and resize 3 images into a small image with PHP?

I don't know if this is even possible with PHP, but I figured if it is, someone here will know how. I'm currently working on a project where users can customize a full body main avatar to be used throughout the site. There are a bunch of different face, hair, etc transparent png images that can...

25
голосов
5ответов
42285 просмотров

Combine 2-3 transparent PNG images on top of each other with PHP

I am working on a custom avatar system for a project, but I have never really done much with the image side of PHP. I assume I need to use GD in some way, but I have no idea where to even start. Basically, there are a bunch of pre-made transparent PNG images. Users can select 2-3 of them to cu...

3
голосов
1ответов
3116 просмотров

PHP Function to bend/warp an image

I'm working with my simple PHP captcha algorithm (http://www.source.ofitall.com/devel/captcha.php) and I have been struggling to try and adjust it to be the more attractive and easier to read, Google style captcha. Does anyone know of a function that will take in a GD image reference and bend/wa...

1
голосов
3ответов
499 просмотров

script for cropping images

I have many (about 1000) images (printscreens), and I need to crop these images (all cropped images are in the same region in the full image). How can I do this in php? Or maybe GIMP is supporting some macro scripts to do this? Thanks in advance.

2
голосов
3ответов
1475 просмотров

PHP GD gives error

Update: TTF file seems to be there after testing. Update: changed to a relative path for the font file. Still doesn't work. I get the following error when I try to make an image using GD through PHP. [Tue Sep 01 19:44:15 2009] [error] [client IP ADDRESS] PHP Warning: imagettftext() [...

5
голосов
1ответов
1293 просмотров

PHP GD - Crop Shape

I want to crop images using the GD, but I want it to crop around a particular shape rather than just a square. Is this possible?

0
голосов
4ответов
643 просмотров

PHP creates image file but only works on local dev, not at the remote server

I have a code that dinamically resizes an image and sends it to the browser. But it doesn't work properly... only if I ask it to output the image to a file instead of the browser. I don't think the problem is my code, because this problem only occurs on the real server; in my computer its worki...

2
голосов
1ответов
4122 просмотров

Have GD get image from binary string

I have a database that stores images in a MySQL BLOB field. I setup a script that selects and displays the images based on an ID in the URL, and I also made it so if you append ?resize=800x600, it would resize the image (in this case, to 800x600). The host that I use doesn't have Imagemagick i...

4
голосов
4ответов
4107 просмотров

export arabic text as images

I have a bunch of lines of Arabic text in UTF-8. The device I am trying to display this one does not support arabic text being displayed. Therefore, I need to convert the text into images. I would like to save each line of text as an image with a specific width. I need to use a specific font ...

0
голосов
3ответов
2175 просмотров

Bad quality of GIF image in PHP GD

I have a watermark script I am working on, the results are good on PNG and on JPG images however a gif image, not so good. I am using PHP and GD Below you can see the difference in quality of the watermark. Anyone know how to improve this? For the gif version I am using $image = imagecreatef...

1
голосов
1ответов
1179 просмотров

include image in generated GD image

Is it possible to include an external image (gif, jpg or png) into a GD generated image? what I'm trying to do is get the latest wordpress blog post (like 5) and generate an image from it. I would like to include the title and the image uploaded with the blog post.

0
голосов
2ответов
352 просмотров

Best way to process images on server?

I know there is a lot of discussion over GD or ImageMagick for a LAMP setup. I can't seem to get a solid answer on the best one though so I will explain my specific needs and maybe someone can help. I will be using on a social networking site where users uploads photos to there image gallery. ...

0
голосов
2ответов
187 просмотров

trying to crop and upload an image to a folder in PHP

i used to do this by uploading the image to the database but later learned its the wrong way because when you try to export the database if ur moving it from localhost to the server the images dont come along :( so anywho, the script i have here is to get the image , crop it, give it a random nam...

6
голосов
7ответов
7384 просмотров

Resize images too large for GD Library on my server

I almost always have a PHP resize script (using GD) in websites for my clients. No matter how many times I tell them to resize their huge 7MP images from their digital camera before uploading them, they still never do it. The result is an "Out Of Memory" error from the server, and the image doe...

0
голосов
1ответов
251 просмотров

image merging using php in GD

I want to merge two images but the problem is one image is in .PNG format and the second one is in .JPG format. The output should be in the .PNG format but the transparency is not appearing.

10
голосов
2ответов
12514 просмотров

PHP/GD Gaussian Blur Effect

I need to obfuscate a certain area of an image using PHP and GD, currently I'm using the following code: for ($x = $_GET['x1']; $x < $_GET['x2']; $x += $pixel) { for ($y = $_GET['y1']; $y < $_GET['y2']; $y += $pixel) { ImageFilledRectangle($image, $x, $y, $x + $pixel - 1, $...