Announcement

Collapse
No announcement yet.

imagecopyresize() into database

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

  • imagecopyresize() into database

    i have problems
    so does my php

    observe:
    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.
    anyone have any idea how to help?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X