OcUK Photo Comp - Season Nine : Round Ten - "Yellow" DISCUSSION

Great, going to have to get up at 6am tommorow to take it again!

I dont get why its stripped. I edit and resize and save to lower filesize in PS5, and then if i open them in win photo viewer, the exif is still there.

But as soon as i upload them to my server (had tsohost check this to see if exif is stripped, its not) or to tinypic or anywhere else, exif gets stripped. So it must be IE or FF doing it (tried all possible browsers). Curiously, if i use FTP it isnt stripped.
 
You guys will have fun, just don't take the pee!
I'll be looking at doing something good this month, have always wanted a single colour based theme :p
 
You guys will have fun, just don't take the pee!
I'll be looking at doing something good this month, have always wanted a single colour based theme :p

My idea was always Red or Blue if I got asked for a theme so at least double meaning (ie angry/sad in this example). But I'm sure I can work with Yellow ;).
 
Hmmm interesting theme... Is it just me or did the winner of the last yellow round win it with orange? :confused:
 
Great, going to have to get up at 6am tommorow to take it again!

I dont get why its stripped. I edit and resize and save to lower filesize in PS5, and then if i open them in win photo viewer, the exif is still there.

But as soon as i upload them to my server (had tsohost check this to see if exif is stripped, its not) or to tinypic or anywhere else, exif gets stripped. So it must be IE or FF doing it (tried all possible browsers). Curiously, if i use FTP it isnt stripped.

TBH you should just use an FTP program anyway, using the uploading thing in cPanel is a bit of a chore sometimes, plus as you've found you have browser compatibility to contend with too. Use something like winSCP to connect to tsohost to upload then you dont have to worry about anything. All my images are hosted on my tsohost webspace and have never had any exif data stripped from the image.

As for the theme.....very interesting! some of the previous entries for this comp last time 'Yellow' was picked look really good
 
These yellow taxis might work. God bless America! :D shame I'm at Philadelphia airport. One more hour and onto Vegas. Awake for 18hrs another 5 to go!
 
Twoblacklines, is there any reason why you have the exif viewer program that wide? Just shrink the window or crop the image, it's huge :\
 
Experimental entry in. As is the way with these things it didn't quite work as envisioned...! Got a few things I want to try this month, time permitting.
 
^^^^ Similar to what I was thinking when I saw the theme!!

Looking forward to seeing peoples entries in such a unspecific theme
 
TBH you should just use an FTP program anyway, using the uploading thing in cPanel is a bit of a chore sometimes, plus as you've found you have browser compatibility to contend with too. Use something like winSCP to connect to tsohost to upload then you dont have to worry about anything. All my images are hosted on my tsohost webspace and have never had any exif data stripped from the image.

As for the theme.....very interesting! some of the previous entries for this comp last time 'Yellow' was picked look really good

Its a custom script

Code:
<?php
ini_set("memory_limit", "200000000"); // for large images so that we do not get "Allowed memory exhausted"
// upload the file
if ((isset($_POST["submitted_form"])) && ($_POST["submitted_form"] == "image_upload_form")) {
    
    // file needs to be jpg,gif,bmp,x-png and 10 MB max
    if (($_FILES["image_upload_box"]["type"] == "image/jpeg" || $_FILES["image_upload_box"]["type"] == "image/pjpeg" || $_FILES["image_upload_box"]["type"] == "image/gif" || $_FILES["image_upload_box"]["type"] == "image/x-png") && ($_FILES["image_upload_box"]["size"] < 10000000))
    {
        
  
        // some settings
        $max_upload_width = 2592;
        $max_upload_height = 1944;
          
        // if user chosed properly then scale down the image according to user preferances
        if(isset($_REQUEST['max_width_box']) and $_REQUEST['max_width_box']!='' and $_REQUEST['max_width_box']<=$max_upload_width){
            $max_upload_width = $_REQUEST['max_width_box'];
        }    
        if(isset($_REQUEST['max_height_box']) and $_REQUEST['max_height_box']!='' and $_REQUEST['max_height_box']<=$max_upload_height){
            $max_upload_height = $_REQUEST['max_height_box'];
        }    

        
        // if uploaded image was JPG/JPEG
        if($_FILES["image_upload_box"]["type"] == "image/jpeg" || $_FILES["image_upload_box"]["type"] == "image/pjpeg"){    
            $image_source = imagecreatefromjpeg($_FILES["image_upload_box"]["tmp_name"]);
        }        
        // if uploaded image was GIF
        if($_FILES["image_upload_box"]["type"] == "image/gif"){    
            $image_source = imagecreatefromgif($_FILES["image_upload_box"]["tmp_name"]);
        }    
        // BMP doesn't seem to be supported so remove it form above image type test (reject bmps)    
        // if uploaded image was BMP
        if($_FILES["image_upload_box"]["type"] == "image/bmp"){    
            $image_source = imagecreatefromwbmp($_FILES["image_upload_box"]["tmp_name"]);
        }            
        // if uploaded image was PNG
        if($_FILES["image_upload_box"]["type"] == "image/x-png"){
            $image_source = imagecreatefrompng($_FILES["image_upload_box"]["tmp_name"]);
        }
        

        $remote_file = "images/".$_FILES["image_upload_box"]["name"];
        imagejpeg($image_source,$remote_file,100);
        chmod($remote_file,0644);
    
    

        // get width and height of original image
        list($image_width, $image_height) = getimagesize($remote_file);
    
        if($image_width>$max_upload_width || $image_height >$max_upload_height){
            $proportions = $image_width/$image_height;
            
            if($image_width>$image_height){
                $new_width = $max_upload_width;
                $new_height = round($max_upload_width/$proportions);
            }        
            else{
                $new_height = $max_upload_height;
                $new_width = round($max_upload_height*$proportions);
            }        
            
            
            $new_image = imagecreatetruecolor($new_width , $new_height);
            $image_source = imagecreatefromjpeg($remote_file);
            
            imagecopyresampled($new_image, $image_source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height);
            imagejpeg($new_image,$remote_file,100);
            
            imagedestroy($new_image);
        }
        
        imagedestroy($image_source);
        
        
        header("Location: upload.php?upload_message=image uploaded&upload_message_type=success&show_image=".$_FILES["image_upload_box"]["name"]);
        exit;
    }
    else{
        header("Location: upload.php?upload_message=make sure the file is jpg, gif or png and that is smaller than 4MB&upload_message_type=error");
        exit;
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Image Upload with resize</title>
<style type="text/css">
<!--
body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    color: #333333;
    font-size: 12px;
}

.upload_message_success {
    padding:4px;
    background-color:#009900;
    border:1px solid #006600;
    color:#FFFFFF;
    margin-top:10px;
    margin-bottom:10px;
}

.upload_message_error {
    padding:4px;
    background-color:#CE0000;
    border:1px solid #990000;
    color:#FFFFFF;
    margin-top:10px;
    margin-bottom:10px;
}

-->
</style></head>

<body>

<h1 style="margin-bottom: 0px">Submit an image</h1>


        <?php if(isset($_REQUEST['upload_message'])){?>
            <div class="upload_message_<?php echo $_REQUEST['upload_message_type'];?>">
            <?php echo htmlentities($_REQUEST['upload_message']);?>
            </div>
        <?php }?>


<form action="upload.php" method="post" enctype="multipart/form-data" name="image_upload_form" id="image_upload_form" style="margin-bottom:0px;">
<label>Image file, maximum 4MB. it can be jpg, gif,  png:</label><br />
          <input name="image_upload_box" type="file" id="image_upload_box" size="40" />
          <input type="submit" name="submit" value="Upload image" />     
     
     <br />
    <br />

     
      <label>Scale down image? (2592 x 1944 px max):</label>
      <br />
      <input name="max_width_box" type="text" id="max_width_box" value="1024" size="4">
      x      
      
      <input name="max_height_box" type="text" id="max_height_box" value="768" size="4">
      px.
      <br />
      <br />
      <p style="padding:5px; border:1px solid #EBEBEB; background-color:#FAFAFA;">
      <strong>Thankyou for using image upload service, provided by thesmileyone.co.uk</strong><br />
  

      

<input name="submitted_form" type="hidden" id="submitted_form" value="image_upload_form" />
          </form>




<?php if(isset($_REQUEST['show_image']) and $_REQUEST['show_image']!=''){?>
<p>
    <img src="images/<?php echo $_REQUEST['show_image'];?>" />
</p>
<?php }?>




</body>
</html>
 
Back
Top Bottom