Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

advertising

related pastes to tag 'resize'

747991 - L0cky: php resize aspect ratio image
  1. if(($src_width - $dest_width) >= ($src_height - $dest_height))
  2. {
  3.         $dest_height = ($dest_width/$src_width) * $src_height;
  4. }
  5. else
  6. {
  7.         $dest_width = ($dest_height/$src_height) * $src_width;
  8. }
747988 - L0cky: php resize aspect ratio image
  1. /*
  2. Check which dimension has the smallest distance, making it
  3. suitable for a straight resize.  The other dimension can then
  4. be padded to restore the ratio.
  5. */
  6. if(($src_width - $dest_width) >= ($src_height - $dest_height))
  7. {
  8.         $dest_height = ($dest_width/$src_width) * $src_height;
  9.  
691788 - Simple script to resize videos t: ffmpeg resize videos aspect ratio height width
  1. #!/usr/bin/php
  2. <?php
  3. // outputs the username that owns the running php/httpd process
  4. // (on a system with the "whoami" executable in the path)
  5. $cmdWidth = 'midentify '.$argv[1];
  6. $finalHeight = $argv[2];
  7. exec($cmdWidth, $output);
  8. //var_dump($output);
  9.  
worth-right
fantasy-obligation