SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question imagecopyresampled and black images

    I'm looking over a script that is having problems with images from a particular source. I think it's a Samsung cell phone. But, whenever the user with this phone attempts to upload and image to our site, the imagecopyresampled seems to choke on it and creates a big black image, nothing else is there. If I take this image and re-save it in an image editor, it uploads and functions fine.

    Other users seem to be uploading images fine, resizing is working (making thumbnails, etc). It's only on this one user's images from his Samsung device. Anyone have any thoughts? I'm stumped...

  2. #2
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A follow up, got an image from an iPhone and Motorola/Android phone and both of those images worked fine. I wonder what it is about that Samsung image that it doesn't like?

  3. #3
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,435
    Mentioned
    82 Post(s)
    Tagged
    3 Thread(s)
    Sounds like it.
    I would compair the Samsung image to one of the others and see whats different. Do you have access to Imagemagick as it has an operator that will give you loads of image information.

    This is using php and you can also try with the command line in Windows or Linux:
    PHP Code:
    <?php  
    system
    ("convert photo.jpg -verbose -identify "); 
      
    ?> 

    command line 
    convert photo.jpg -verbose -identify
    Change photo.jpg to the photo path.

    P.S. I am off to bed now but if you want to PM me a link to a couple of images I will run them through IM tomorrow and let you know the information - I can not analyse it or tell you what is wrong as I would not know but you will be able to see what is different between the two files.
    Also is it just the one users phone or all Samsung?
    Last edited by Rubble; Apr 13, 2012 at 14:25. Reason: Added P.S.

  4. #4
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good idea Rubble, thanks

  5. #5
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, it's fairly obvious it was his phone (which now he tells us he no longer has ). checked all the images out and the only difference that I could tell was that 1 image was from a Samsung device, everything else looked fine. All other images I've thrown at it works, so he'll just have to run all those old images through some image editing software and call it resolved.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •