Posts by mySudi

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

Hello Authors and the entire Envato Community, just wanted to with you a happy holiday, hope you enjoy.

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

Hello, thanks, my template got rejected. please if any you has time kindly advise. here is the link to the live demo.

http://mnimani.com/jemimah/

Thanks

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

Hello fellow Authors, Hope you’re good and having a great time. Well i wanted to ask something small, which i’d like your advice on.

I wrote a simple image upload function, what i’d like to further achieve is be able to set maximum image upload size, and still be able to retain the native image extension. So if the image to be uploaded was a .gif :: then the final upload should be a .gif , another funny thing :: i realized if i upload a .png image with transparency the final upload is no-longer transparent but with a dark background.

Any idea?

Here is the function::

 

/*
 * Image Upload Function
 */
function imageup($destiny,$width = 800) {

    if (!empty($_FILES['image']['name']))
    {
        if(preg_match('/[.](JPG)|(jpg)|(gif)|(GIF)|(png)|(PNG)$/',$_FILES['image']['name']))
        {
            $uploadDirectory = 'global/'.$destiny.'/';
            $uploadName = $_FILES['image']['name'];
            $source = $_FILES['image']['tmp_name'];
            $target = $uploadDirectory . $uploadName;
            move_uploaded_file($source, $target);

            if(preg_match('/[.](GIF)|(gif)$/', $uploadName)) {
                $im = imagecreatefromgif($uploadDirectory.$uploadName) ;
            }
            if(preg_match('/[.](PNG)|(png)$/', $uploadName)) {
                $im = imagecreatefrompng($uploadDirectory.$uploadName) ;
            }

            if(preg_match('/[.](JPG)|(jpg)|(jpeg)|(JPEG)$/', $uploadName)) {
                $im = imagecreatefromjpeg($uploadDirectory.$uploadName);
            }

            /*
             * Image size
             */
            $w = $width;

            /*
             * Get width
             */
            $w_src = imagesx($im);

            /*
             * Get height
            */
            $h_src = imagesy($im);

            if($w_src < 3000 || $h_src < 3000){

                /*
                 * Create an empty true color Image
                 */
                $dest = imagecreatetruecolor($w_src,$h_src);

                imagecopy($dest, $im, 0, 0, 0, 0, $w_src, $h_src);

                /*
                 * We will use date to save our uploads
                 */
                $date=time();
                imagejpeg($dest, $uploadDirectory.$date.".png");

                $photoUpload = $date.".png";

                $delfull = $uploadDirectory.$uploadName;

                unlink($delfull);

                /*
                 * Return image and delete temporary image
                 */
                return $photoUpload;
                imagedestroy($photoUpload);

            }else{
                return false;
            }

        }else{
            return false;
        }
    }
}

And here is how i call the function:

/*
 * Upload Image
 /
if (isset($_FILES'image') and !empty($_FILES'image'))
{
    /
     * Here we will call the upload function and define an upload directory
     */
    $companyImage = imageup('logo');
    if(empty($homePageShot)){
    $error = ' Upload empty ';
}
}else{
    $companyImage = "I love you, but i need a photo to show you. But i am headed to the DataBase.";
}
84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

I hope they show the full thing instead of some silly teaser that shows a x100 zoomed in version of a button.

hahahahahahaa!

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

...just been wondering how many envato accounts does any of us in here have?

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

3d modeling

oooh lovely! have you ventured into character rigging? maybe we can do something together!

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

dancing and reading and programming

well i am a poor dancer! so envious!

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

Astronomy and astrophysics as well as watching night sky.

Ooooh lovely!!! i bet you have a huge telescope hanging from your window pane!!! a bunch of binoculars and star maps!!!

By the way i tend to believe that Astronomers are the most intelligent people on earth!!! Looks like nature seems to favor you, did you have a chance to see the falling metor?!!!

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

S K A T E B O A R D I N G

Ooooh lovely!!! wish somebody would teach me skateboarding!!! how is Guatemala?!!!!

please share some news and photos!!!

84 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
mySudi says

programming….

You’ve got an awesome portfolio!!!!

by
by
by
by
by
by