Jump to content

Search the Community

Showing results for tags 'imagick'.

  • 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. Hi everyone, here is a thing that I need help with. Firstly I am not good in php programming - have some understanding of it. First: why? I am starting up a site that sells editorial content (images) to different newspapers, magazines and so on. The website will show the images and let the customer choose licens and size of image (large, medium, small) since there are big difference between prices, depending on the size of the image, I need the function to on-demand resize the image after customers choice. So far so good - the site I have works and if I fiddle around with pricegroup and size it does the job of resizing - but and this is a big but, when it resizes the image it also deletes all information in exif, metadata colorprofile and resolution. So the customer gets a image that he cannot print or use at all. The developer of the shoppingcart will not alter the file to solve this issue (atleast not yet) but I am free to do this myself as I see fit. So to clarify: I need to modify the code below to preserve all information (exif, colorprofile, copyright, metadata). Either by using wordpress GD library (it does use that now) or switch it for better usage with imagick. But the original file must be left unaltered so a new copy with the new size is created upon checkout and then made available for download after purchase. Code that does the resizing: public function create_download_size( $size, $location=null ){ $image_p = imagecreatetruecolor( $size['width'], $size['height'] ); $image = imagecreatefromjpeg( $location ); list( $current_image['width'], $current_image['height'] ) = getimagesize( $location ); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $size['width'], $size['height'], $current_image['width'], $current_image['height']); $destination_file = $this->tmp_dir . basename( $location ); if ( ! file_exists( $destination_file ) ){ wp_mkdir_p( dirname( $destination_file ) ); } From what I have been told the function "imagecopyresampled" make a copy of the original and it is then all information is deleted. Can I extract the exif and then rewrite it back to the new resized copy of the image? or rewrite this code to use imagick instead, imagick should preserve exif (do not know but been told so) So do anyone want to give it a try and solve this? I have according to my webhost imagick installed at "exec('/usr/bin/convert') I hope that this is something that can be solved. Regards, mxfarsa..
×
×
  • 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.