Skip to content

A Nooku component that handles file upload and image resizing

Notifications You must be signed in to change notification settings

Macsmice/com_attachments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Example usage:

KService::get('com://admin/attachments.model.images', array('original'=>$row->logo, 'file_path'=>'media/com_files/raw/'))
    ->set('width',200)
    ->resize()
    ->save(array('path'=>'media/com_files/raw/display/'));
    ;

Saves a proportionally sized image (width 200px) in the directory media/com_files/raw/display/ under the original's file name


KService::get('com://admin/attachments.model.images', array('original'=>$row->logo, 'file_path'=>'media/com_files/raw/'))
    ->set('width',200)
    ->set('height',200)
    ->set('mime','image/jpg')
    ->resize()
    ->save(array('path'=>'media/com_files/raw/display/', 'name'=>'mycroppedimage'));
    ;

Saves a proportionally sized and cropped jpeg image (200px x 200px) in the directory media/com_files/raw/display/ under the name mycroppedimage.jpg


KService::get('com://admin/attachments.model.images', array('original'=>$row->logo, 'file_path'=>'media/com_files/raw/'))
    ->set('width',200)
    ->set('height',200)
    ->set('mime','image/jpg')
    ->resize()
    ->displayToBrowser();
    ;

Outputs a proportionally sized and cropped jpeg image (200px x 200px) tothe browser (for whatever it's worth). This method is alpha and not yet tested, so no guarantees ;)

About

A Nooku component that handles file upload and image resizing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages