Questions tagged [imagecreatefrompng]

Anything related to imagecreatefrompng PHP function for creating an image from file or URL

imagecreatefrompng is a PHP function that returns an image identifier representing the image obtained from file or URL

109 questions
2
votes
2 answers

PHP script GD library memory problem

On my site I allow users to upload 6 images max size of 5MB. They must be in format either gif,jpg/jpeg. Most images users seem to upload are about 2MB roughly (1006188 bytes) and height:1536 pixels by width:2048 pixels so quite big (especially if…
daza166
  • 3,543
  • 10
  • 35
  • 41
2
votes
1 answer

trying to have png image show up in my Ruby app

I'm trying to get an image to show up, but it's just not working. Mind you, this is my very first Ruby app (self-programmed product) and I cloned the Repo, so my apologies in advance if I'm not providing all the required information from the get-go…
sjmario38
  • 33
  • 5
2
votes
2 answers

imagepng is not working, it creates a blank image and image does not compress

I am creating a thumbnail of myImage of various format (jpg, png). Here is my code
Hitesh
  • 4,098
  • 11
  • 44
  • 82
2
votes
1 answer

imagecreatefrompng not always working on the same image

This is a bit of an odd one. Users can upload an image to the server, insert some text and then from server side I create a new image with the user's text and the uploaded image. To create to new image I am using imagecreatefrompng or jpg depending…
j.grima
  • 1,831
  • 3
  • 23
  • 45
2
votes
1 answer

How to catch invalid image when using PHP imagecreatefromstring

i am using imagecreatefromstring and currently validate for proper image file format. So a link of: swqkdwfibqwfwf Wont work, because its not a valid file type. But i have just discovered this: sibdlsibiwbifw.png Will send without an error from my…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
1
vote
1 answer

imagecreatefrompng() and size limitation

I have some troubles with the function imagecreatefrompng(), in PHP. I develop a website which has the goal to permit users to upload their own Sprite Comics (kinds of Comics made with ressources extracted from videogames, called sprites). I want to…
KorHosik
  • 1,225
  • 4
  • 14
  • 24
1
vote
1 answer

This picture become blurry after resizing

After uploading and resizing this photo, i noticed the quality of it become slightly blurry... why does this happen? I have enough space so what else could be the problem? original, after resizing, But other pictures that I uploaded have no…
Run
  • 54,938
  • 169
  • 450
  • 748
1
vote
1 answer

how do i convert PNG to JPG in PHP?

I want read a google map url, convert the map to jpg & return the jpg map. I suppose to have two markers in my map. however each time the map return to me only contains the first marker. Is there some characters that cannot be used thats why my url…
Dayzza
  • 1,561
  • 7
  • 18
  • 29
1
vote
1 answer

imagecreatefrompng makes imported image block-ish?

I'm trying to use the following PHP in order to apply randomly generated text files to an image. (I'm just using a random image right now.)
Nicolas
  • 55
  • 1
  • 5
1
vote
3 answers

PHP image Re-sizer not working for png/gif

I'm currently writing a front end for a PHP script(not written by me) that resizes images(PNG,GIF,JPG) and saves them as JPEGs. Its very simple and works fine when inputting JPEGs, but seems not to work for PNG or GIF images. Here's the code for the…
tcnarss
  • 585
  • 5
  • 23
1
vote
0 answers

imagecopyresampled not selecting defined coordinates of image

I've added a cropping feature to a social network CMS written in PHP called Sngine. I added a jquery plugin so users can select the area of the image that they want. I'm using imagecopyresampled to select the desired coordinates of the image,…
Haider Ali
  • 918
  • 2
  • 9
  • 26
1
vote
1 answer

Merging transparent images on PHP

I'm trying to merge of this images: https://i.stack.imgur.com/VwaOg.jpg -- Base https://i.stack.imgur.com/UDfjI.jpg -- Marking the result should look like this: https://i.stack.imgur.com/cv1WA.jpg I'm getting an image that is removing all of the…
1
vote
1 answer

PHP imagecreatefrompng(file) fails when file is a dynamic image file?

Is it possible to use imagecreatefrompng() with a php file that returns a dynamic png image? eg. where image.php looks something like:
1
vote
1 answer

PHP saves the png file as a 0 byte to disk

My intention is save the generated qr code image on my local. I have already checked out whole stackoverflow question about it. However they didn't help me to solve this bug.
ziLk
  • 3,120
  • 21
  • 45
1
vote
1 answer

handling svg images php

I have an image function for handling various image types. Now I need to include svg images also. I would like to know functions like imagecreatefromgif($image) for svg images,something like imagecreatefromsvg($svgimage). Also I would like to know…
Techy
  • 2,626
  • 7
  • 41
  • 88