Announcement

Collapse
No announcement yet.

image resizing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gellpak
    replied
    :
    PHP Code:
    $imgsize getimagesize($form_data);
    $imgwidth $imgsize['0'];
    $imgheight $imgsize['1'];
    $imgtype $imgsize['2'];
                      
    $size filesize($form_data);
                    
    $image substr($form_data_type,0,5);
    $image strtolower($image);
                    
    $image_out ImageCreate($bannerwidth,$bannerheight);
    $image_in ImageCreateFromJpeg($form_data);
    $data imagecopyresized($image_out,$image_in,0,0,0,0,$bannerwidth,$bannerheight,$imgwidth,$imgheight);
    $data addslashes(fread(fopen($image_out,"r"), filesize($data))); 
    assume that all the variables come from a form with a browse field, with a name of form_data
    this is valid code, modified, that i used to read in an image and place it into the database
    all i want to do is resize that image before i place it in the database
    after hours of reading through the php.net and other sites' help, im still stuck.

    Leave a comment:


  • Austin
    replied
    Post the code that you used and we can look at it and tell you whats wrong, if anything is.

    Leave a comment:


  • Gellpak
    started a topic image resizing

    image resizing

    i havent been able to make this work-- all the commands are good, i think, but when i attempt it, the scritp gives me an "invalid image pointer" error
    but i cant figure out what form variable i need to use.... all the ones that i would expect to work ...dont
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X