Image loaded is empty, no exception thrown

  • Anonymous - 2013-03-27

  • Anonymous - 2013-03-27

    Hi, the post was posted accidentally while i was still editing, and I have no idea where the edit button is.
    For this project, I need to merge the following:
    1. a base image with some background patten.
    2. a photo load from user facebook album.
    3. a frame png with a hole to fit in the baby face.
    4. deco eyes
    5. deco mouth.

    I have never encountered this situation during development and testing. However, when comes to production, the rate of empty image is quite high. It s about 10%. Appreciate if anyone can point me an direction.

    My code is here:

                $base = EWideImage::load(TEMPLATE_PATH);
                $photo= EWideImage::load($photoURL)->resize($adjusted_photo_width,$adjusted_photo_height);
            }catch(Exception $e){
                EcError::printJson(EcError::$SYSTEM_ERROR, $e->getMessage());               
            $result = $base->merge($photo, $adjusted_photo_left, $adjusted_photo_top);
            //marge the frame
            $frame = EWideImage::load('images/photo-zone/photo-frame'.$frame_id.'.png');
            $deco_eye= EWideImage::load('images/photo-zone/deco/Face_cutomization_eyes'.$eyes_id.'.png');
            $deco_mouth= EWideImage::load('images/photo-zone/deco/Face_customization_Mouths'.$mouth_id.'.png');
            //save image
            $output_path =UGC_PATH.$submissionId.'.jpg';
  • Gasper Kozak

    Gasper Kozak - 2013-06-26

    Hi, sorry for the late response. Did you manage to make this work?

    I'd start off by saving the $result image in between steps, so you can find out where it goes wrong.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks