Jump to content

Search the Community

Showing results for tags 'create image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello i am just wondering about this code - its strange... when i just work with one section it works... but thing is i want to create two images from the one image in the /temp/ directory. This will then have two sent to /small/ and /large/ but it just comes up blank with no error... yet it only happens with larger image file sizes and .JPG extensions instead of .jpg.... The strange thing is... if i just work with one section of the code... it works! ...whatever the image. Hope you can help. Thanks Lewis $image_name = 'image'; $product_src1 = 'plus_cms/image_uploads/product_images/temp/'.$image_name.'.jpg'; $product_src2 = 'plus_cms/image_uploads/product_images/temp/'.$image_name.'.jpg'; $product_src3 = 'plus_cms/image_uploads/product_images/small/'.$image_name.'.jpg'; $product_src4 = 'plus_cms/image_uploads/product_images/large/'.$image_name.'.jpg'; $targ_w1 = $get_width; $targ_h1 = $get_height; $im1 = imagecreatetruecolor($targ_w1, $targ_h1) or die('Cannot Initialize new GD image stream'); // Background to Image $img_r1 = imagecreatefromjpeg($product_src1); //Creating Image $image1 = imagecopyresampled($im1,$img_r1,0,0,$_POST['x'],$_POST['y'],$targ_w1,$targ_h1,$_POST['w'],$_POST['h']); imagejpeg($im1, $product_src3); $targ_w2 = $get_width * 2; $targ_h2 = $get_height * 2; $im2 = imagecreatetruecolor($targ_w2, $targ_h2) or die('Cannot Initialize new GD image stream'); $img_r2 = imagecreatefromjpeg($product_src2); $image2 = imagecopyresampled($im2,$img_r2,0,0,$_POST['x'],$_POST['y'],$targ_w2,$targ_h2,$_POST['w'],$_POST['h']); imagejpeg($im2, $product_src4);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.