SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Location
    burlingame, ca
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need help; upload graphic, resize, and save.

    i have a deadline on a project... i need to script a mini app or find or buy a plugin that will aid in the following:

    this script would use something like imagemagick

    case example:
    say client 'a' is creating a profile for restaurant he or she owns to be advertised.

    the image, gdbo.jpg is 30 mb in size, cmyk, with a resolution of 600dpi, or ppi and is 1600x2400 worked great for the magazine advertiser.

    the current state of the image isn't ideal for the web -- client 'a' (a chef and restaurant owner) and doesn't know this.

    so on upload, i'd like to convert this to image to say 72dpi, ppi change from cmyk to rgb, and get that 1600x 2400 res down to say 500 x 500 (relative to the original dimentions)

    this is out of my scope of expertise, any ideas?

    say upon upload... aside from accepting a file over say 100mb in size, i need to be able to allow it, and get that file down to the specs mentioned earlier.

    how would i approach this?

    what i have in place resizes the image (viewable anyhow) however, we are using the original file until i can get in and manually change it (this has become a tedious task) so it works but isn't in any way ideal.

    oh, apache1.3, php4, mysql4.4, freebsd6.2 is the platform

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,443
    Mentioned
    82 Post(s)
    Tagged
    3 Thread(s)
    Try:
    PHP Code:
    <?php
    exec
    ("convert /(Original.jpg -colorspace RGB -density 72 /) -resize 500x500 New.jpg  ");
    ?>

  3. #3
    SitePoint Member
    Join Date
    Aug 2007
    Location
    burlingame, ca
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ok... now the track is inline

    take a look at this link...
    http://www.defusion.org.uk/demos/060519/cropper.php

    now.. in this line of code, the 'layer' is locked at a certain ratio:

    case( 'ratioFourThree' ) :
    new Cropper.Img( 'testImage', { ratioDim: { x: 220, y: 165 }, displayOnInit: true, onEndCrop: onEndCrop } );
    break;

    can these x and y ratio settings be a percentage rather than a whole number value?

    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •