Re: black background after auto_rotate and resize

See all posts See thread Reply

Re: black background after auto_rotate and resize new!
by Haruma, 4 years, 10 months ago
system information
- GD version : 2.1.0
- supported image types : png jpg gif bmp
- open_basedir : /home/siambridge/:/tmp/:/var/tmp/:/opt/alt/php53/usr/share/pear/:/dev/urandom:/usr/local/php70/lib/::/usr/local/php70/lib/:/usr/local/php73/lib/:/usr/local/lib/php/
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : DBE7D7B0-F62E-4687-85D5-D32FA7AD9F11.jpeg
file_src_name_body : DBE7D7B0-F62E-4687-85D5-D32FA7AD9F11
file_src_name_ext : jpeg
file_src_pathname : /tmp/phpl3Xa4m
file_src_mime : image/jpeg
file_src_size : 1984825 (max= 67108864)
file_src_error : 0
- source file is an image
image_src_x : 4032
image_src_y : 3024
image_src_pixels : 12192768
image_src_type : jpg
image_src_bits : 8
process file to ../synergy/images/
- file size OK
- file mime OK : image/jpeg
- new file name ext : jpg
- new file name body : 6frGBmk6QI4UfAbhR376Wy2lD9aU
- new file name ext : jpg
- file name safe format
- destination variables
file_dst_path : ../synergy/images/
file_dst_name_body : 6frGBmk6QI4UfAbhR376Wy2lD9aU
file_dst_name_ext : jpg
- EXIF orientation = 6 : 90 rotate right
- image operation, change extension for conversion type
- checking for auto_rename
- destination file details
file_dst_name : 6frGBmk6QI4UfAbhR376Wy2lD9aU.jpg
file_dst_pathname : ../synergy/images/6frGBmk6QI4UfAbhR376Wy2lD9aU.jpg
- 6frGBmk6QI4UfAbhR376Wy2lD9aU.jpg doesn't exist already
- image resizing or conversion wanted
- source image is JPEG
- resizing...
calculate y size
resized image object created
image_src_x y : 4032 x 3024
image_dst_x y : 2048 x 1536
- auto-rotate image : 90
- converting...
fills in transparency with default color
- saving image...
JPEG image created
image objects destroyed
- process OKReply
Re: black background after auto_rotate and resize new!
by colin, 4 years, 10 months ago
It all looks normal to me. But:
- are you sure your original image is a JPEG? A JPEG doesn't have transparency. If the background is filled with some black color, it is because the image is transparent to start with
- does your code work with smaller images? Your images are very large, and it may cause memory issuesReply