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

[eluser]hugle[/eluser]
Hello again Smile

on your page, in the manual it is written:
Code:
save_pe($prepend="", $append="", $overwrite=FALSE)

but it should be : "save_pa(..."

One little mistake Smile

as for now, no problems at all Smile

Thanks one more time Smile
#22

[eluser]Mat-Moo[/eluser]
Updated to 0.9.9 and added shadow facility, updated files on website.
#23

[eluser]Antoniofu[/eluser]
I get this error :

Message: Undefined property: Image_moo::$error

the library is copied in "system/libraries/"
what's wrong?
#24

[eluser]Mat-Moo[/eluser]
Should be system/application/libraries for ci 1.7.2 and /application/libraries for ci 2.
#25

[eluser]Antoniofu[/eluser]
thanks for the quick reply.

I've tried putting in the application/library folder also

I'm using codeigniter 1.7.2

Sorry I'm a newbie with codeigniter and programming.
I just load the library in the controller and then, in the view put this code :
$this->image_moo
->load('DSC01707.JPG')
->resize_crop(100,100)
->round(5)
->save_dynamic();
it's correct?
#26

[eluser]Antoniofu[/eluser]
I know that the my image path should be different, is only an example.

i have 8 images and I would to create thumbnail for each one. The name of the images come from a database. I have the array with the name of each image and I would like to create this mini-gallery.
#27

[eluser]Mat-Moo[/eluser]
For 1.7.2 you need it in system/application/libraries Smile Save_dynamic will stream output to the screen not save it anywhere. But otherwise your code is identical to my example. add
Code:
if($this->image_moo->errors) print $this->image_moo->display_errors();.
after the call (Make sure you using php5) as it will tell you any errors it encounters.

As for the gallery, assuming you have done the query (active records)
Code:
foreach($dbquery->result() as $row)
{
$this->image_moo->load($row->image_name)->resize_crop(100,100)->round(5)->save_dynamic();
}
However it would be better to create thumbnails when the image is uploaded and save to disk, instead of always resizing the image.
#28

[eluser]Antoniofu[/eluser]
Thanks, now the library works.

The problem is that doesn't show the thumb and the error is :
could not locate file_name <p>No main image loaded!</p>

the path is correct, is like :
Code:
src="&lt;?php echo base_url(); ?&gt;images/data/&lt;?php
                $this->image_moo->load($row->foto)->resize_crop(100,100)->round(5);
                if($this->image_moo->errors) print $this->image_moo->display_errors(); "
            ?&gt;

The folder as all the permissions and I'm on my locahost server.

I will try directly online.

Thanks a lots for helping and share this library.
#29

[eluser]Mat-Moo[/eluser]
Your calling a function that generates the image, there is no path needed, just use
Code:
src="&lt;?php $this->image_moo->load(base_url()."images/data/".$row->foto)->resize_crop(100,100)->round(5)->save_dynamic()?&gt;"
You can't really add the error checking in to the img src, I *think* that will work, not the best way to do it. Better off creating a helper function, but even then you should consider not resizing at run time as the amount of additional cpu power required is a lot more.
#30

[eluser]HomersBrain[/eluser]
I need help with my watermarks. I've tried watermarking a png but all I get is a black image the size of the png. I was wanting to watermark the png because it is overlayed a jpg with a fade effect, and moves out of the way when the pointer is over the top.

So, I gave up and tried to do the jpg instead. Here's my code ($image2 is passed in and is ok with the correct path):

Code:
$this->image_moo
                ->load($image2)
                ->make_watermark_text("copyright","/applications/xampp/xamppfiles/htdocs/project/x.ttf",25,"#000")
                ->watermark(1)
                ->save_dynamic();

and here's my error

A PHP Error was encountered
Severity: Notice
Message: Undefined property: Image_moo::$watermark_method
Filename: libraries/image_moo.php
Line Number: 829

Can you help?




Theme © iAndrew 2016 - Forum software by © MyBB