473,320 Members | 1,810 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,320 software developers and data experts.

exif_imagetype wont work on large(width&height) images

Hi,

I'm trying to allow my clients to upload some photographs...they are taking the photos on an iphone and the dimensions are 2500px wide iapprox.

I'm using exif_imagetype to determine the image type but when the image is over 1500px approx it wont detect the image type.....anything under and it detects and uploads fine.

Heres the code in question:
Expand|Select|Wrap|Line Numbers
  1. $extensions = array(IMAGETYPE_GIF => '.gif', IMAGETYPE_JPEG => '.jpg', IMAGETYPE_PNG => '.png');
  2. $exiftype = exif_imagetype($imagetmp);
  3.  
$imagetmp is my temp uploaded image

If I try to show $exiftype in the error it returns null

On another note i just checked my peak memory usage and its only 65mb and my limit is set to 250mb so its not that.

I also tried the script on a live version of the image and it works ok....its only when i attempt it on an image im uploading......do you need to upload the image first and check/delete if nescessary??....as this is the only workable solution i can think of unless someone can identify a reason?
Sep 19 '11 #1
1 2185
Problem fixed....it was upload_max_filesize being set to 2mb in my php.ini......upped it to 5mb and it works fine.

The problem wasn't with exif_imagetype it was because my $_FILES[''] values were empty....duhh!
Sep 21 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: R0bert Nev1lle | last post by:
Internet Explorer always presents me with a challenge (partial repost). The current issue involves emulating max-width in IE using the technique described by Svend Tofte. ...
2
by: Georg Goerg | last post by:
hello, i want to make website with a top navigation bar and one on the left. so by using css i define three layers and everyone of them has length attr. in percents. but if i want to put...
5
by: S | last post by:
Whew! Thanks for your help on that last post. I actually understand what you wrote. I'm trying not to use these groups as a way to get my code written for me, I really want to understand what...
2
by: Steve Franks | last post by:
I am familiar with the fact that you have to use runat=server and links staring with "~/" to ensure proper mapping of paths to relative URLs when using master pages. However this does not seem to...
2
by: Farce Milverk | last post by:
Hi, I'm looking for an algorithm to resize an image of arbitrary size to a "fixed" / required width and height. For example, my application requires that images be no larger than 440 pixel...
2
by: emma.sax | last post by:
My script is as follows: function setImageSizes() { var staticHeight = 70; if(!document.getElementsByTagName || !document.images) return false; var thumbnail =...
1
by: Scott Elgram | last post by:
Hello everyone, I'm hoping someone here can pose an alternative that might work better than what I have created so far. I have a web site that needs to deal with Multi-Page TIFF images. ...
13
RMWChaos
by: RMWChaos | last post by:
I have four pieces of code to automatically build my navigation buttons and choose which page to load: 1) a hover script, which swaps the images onmouseover and onmouseout, 2) a DOM loader, which...
10
by: Ben | last post by:
Hi at all I am looking for the natural size of an image I found this function : while ((imgHeight = image.getHeight(this)) == -1 ) { // loop until image loaded
28
KeredDrahcir
by: KeredDrahcir | last post by:
Is there a simple way to get the dimensions of a video that's been uploaded. I've looked around and either find suggestions the use something else on the web that either doesn't work or doesn't...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.