473,382 Members | 1,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

imagejpeg and imagepng

According to the PHP manual, imagejpeg and imagepng have a return value of
type "int" - but I do not see where it says what the values mean. Can
anyone enlighten me?

Here are the manual pages:
http://us4.php.net/manual/en/function.imagejpeg.php
http://us4.php.net/manual/en/function.imagepng.php

-Josh
Jul 17 '05 #1
2 4067
On Tue, 16 Dec 2003 23:06:22 GMT, "Joshua Beall"
<jb****@donotspam.remove.me.heraldic.us> wrote:
According to the PHP manual, imagejpeg and imagepng have a return value of
type "int" - but I do not see where it says what the values mean. Can
anyone enlighten me?

Here are the manual pages:
http://us4.php.net/manual/en/function.imagejpeg.php
http://us4.php.net/manual/en/function.imagepng.php


Looking at the source code, it appears to use the RETURN_FALSE macro for
failure and RETURN_TRUE for success. So probably 0 for failure, 1 for success.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote in message
news:Od****************@nwrddc01.gnilink.net...
According to the PHP manual, imagejpeg and imagepng have a return value of
type "int" - but I do not see where it says what the values mean. Can
anyone enlighten me?

Here are the manual pages:
http://us4.php.net/manual/en/function.imagejpeg.php
http://us4.php.net/manual/en/function.imagepng.php


I'm guessing it'd be an error code so it returns something like a 0 if it
succeeds and another number if it fails.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Yang Li Ke | last post by:
Hi guys, Im trying to use this code that I found on php.net to create a thumbnail from an image but it simply displays a black square. Anyone can tell me what am I doing wrong? <? function...
4
by: Steven Stern | last post by:
I'm sketching out an application that would automagically do a photo gallery. As part of this, I want to examine each graphic in the a given directory, look for an embedded thumbnail and, if...
1
by: Phil Powell | last post by:
I am using the imagejpeg() and the imagegif() (also imagepng(), etc.) commands that will write an image Object back into an existing image in a directory. Everything works fine, except that when...
4
by: xcomm | last post by:
I tried to create some images with php and gd and get always Call to undefined function imagejpeg() or Call to undefined function imagepng() PHP was build with --with-gd --with-zlib but I...
2
by: greyham433 | last post by:
I'm having a problem with some simple code: <html> <body> <?php header("Content-type: image/png"); $im = imagecreate(200, 200); $green = imagecolorallocate($im, 0, 255, 0); imagefill($im, 0,...
1
by: André Gasser | last post by:
hello newsgroup, I just discovered a weird effect in my php code. here is the flow of my code: 1. upload jepg file to server 2. create new (empty) jpeg file using imagecreatefromjpeg()...
3
by: Bob Bedford | last post by:
I'm trying to add an imagejpeg result as an attachment of an email. For creating the email I'm using phpmailer class (http://phpmailer.sourceforge.net/) Now I do create an image from a jpeg file...
21
by: cman | last post by:
does anyone know why i can't generate images with: header("Content-type:image/jpeg"); imagejpeg($img_number); i've tried different examples but i always get a text output as if the header...
6
Markus
by: Markus | last post by:
I'm adding to my script a section that allows a thumbnail to be created and saved. I get this error: Warning: imagejpeg() : Unable to open '../uploads/thumb/' for writing: Is a directory in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.