Welcome Guest, Not a member yet? Register   Sign In
Image Moo - Image manipulation library
#81

[eluser]Volder[/eluser]
Hello,

I'm using Image_Moo library and find it very useful. Thanks!

But I've got a question, for all images which are processed by the library (I use cropping basically and adding watermark) I use PageSpeed add-on check in Chrome and I get that all images could be compressed additionally by 10-15% without loss of quality.

Any idea how it could be improved within the library?
#82

[eluser]Unknown[/eluser]
I am new and can not make this work ...

I am trying to upload and image using upload library then use mat-moo to create watermark ..

here is my code ..

Code:
$config = array(
        'upload_path'   => './uploads/phones/',
        'allowed_types' => 'gif|jpg|png',
        'max_size'      => '2048',
        'max_width'     => '1024',
        'max_height'    => '1024',
        'encrypt_name'  => TRUE,
    );        
       $this->load->library('upload', $config);
       if (!$this->upload->do_upload()) {
    $data['errors'] = $this->upload->display_errors();
       }else{
    $upload_data = $this->upload->data();
       }
    
       $this->load->library('image_moo');
      
       $this->image_moo
       ->load($upload_data['full_path'])
       ->load_watermark("/assets/img/logo.png")
       ->resize(500,440)
       ->watermark(5)
       ->save_dynamic();
      
       print $this->image_moo->display_errors();

my images are in uploads/phones/ an watermark logo is in /assets/img/logo.png




Theme © iAndrew 2016 - Forum software by © MyBB