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

[eluser]gaben[/eluser]
Hi, this is very good library!
An idea for saving the thumbnails:
if i want to save the thumbnail like the original file name, i just write to save() that word, like thumb_marker: _thumb, in the offical image_lib Smile

i hope you understand, sorry for my bad englsih Smile

if i use a transparent PNG file for watermarking, why make a white background for it? Sad can you help me?
#12

[eluser]Mat-Moo[/eluser]
Can't see how I can add that to the current save facility easily, but easy to add it as a new function
Code:
function save_pa($prepend="", $append="", $overwrite=FALSE)
    //----------------------------------------------------------------------------------------------------------
    // Saves the temp image as the filename specified,
    // overwrite = true of false
    //----------------------------------------------------------------------------------------------------------
    {
        // validate we loaded a main image
        if (!$this->_check_image()) return $this;

        // get current file parts
        $parts=pathinfo($this->filename);

        // save
        $this->save($newfile,$parts["dirname"].'/'.$prepend.$parts['filename'].$append.$parts["extension"]);

        return $this;
    }
Needs a new private var $filename="" and in the load needs $this->filename=$filename;
Then (untested) you should be able $this->image_moo->load("/a/b/c/xxx.gif")->resize(400,400)->save_pa("x_","_y",TRUE); which would save the file as "/a/b/c/x_xxx_y.gif" at least that is the theory. Will fully test and add to library
#13

[eluser]Mat-Moo[/eluser]
Updated to 0.9.2, fixed a couple of minor bugs :-
Full details at
http://www.matmoo.com/codeigniter/image_moo/
#14

[eluser]hugle[/eluser]
Hello Mat-Moo,

this lib is amazing Smile thank you!

Once it saved me, today I have problems using image watermarks using native CI lib. will see if your lib will help...

Btw, I could like to ask, if it could be difficult to implement smth like this:

->set_background_colour("#49F") - this already done
but I would need smth like this: ->set_background_image("image.x") - so the pic would be put over the image ....
so we have nicer background Smile

Thank you so much!
#15

[eluser]hugle[/eluser]
Hello again Smile

wanted to inform you, that line 233 needs to be changed, to:
Code:
$this->save($parts["dirname"].'/'.$prepend.$parts['filename'].$append.'.'.$parts["extension"]);

I'll play with it and post pore results I come up with any problems, modificationsSmile
#16

[eluser]Mat-Moo[/eluser]
http://www.matmoo.com/codeigniter/image_moo/ if you check the comments that has already been pointed out Smile and fixed (Just not uploaded yet). What's the point of the background image? I'm not sure what you are trying to achieve. Thanks for the positive comments though.
#17

[eluser]hugle[/eluser]
[quote author="Mat-Moo" date="1285430365"]http://www.matmoo.com/codeigniter/image_moo/ if you check the comments that has already been pointed out Smile and fixed (Just not uploaded yet). What's the point of the background image? I'm not sure what you are trying to achieve. Thanks for the positive comments though.[/quote]

Yeah, I spotted this comment later Smile sorry bout that..

Well, sometimes, when we have a box of 200x200 pixels, and picture only 200x100..
As for now, we can fill it with the background color, and that's ok.
but sometimes it would be good to put background instead of a color.

Other solution could be:
to convert an image to PNG, and instead of a color background it would place transparent background. and we just make a <div><img src="./image.png"></div>

Where <DIV> would have an image as a background

What do you think about it? maybe there are even more elegant solutions?

Thank you!
#18

[eluser]Mat-Moo[/eluser]
A background div would make more sense, otherwise if there is a change to the site design all your images created would be wrong Smile
#19

[eluser]hugle[/eluser]
[quote author="Mat-Moo" date="1285436105"]A background div would make more sense, otherwise if there is a change to the site design all your images created would be wrong Smile[/quote]

Good tip Smile
Well, I think I will later search if I can make at least background transparent Smile so the <DIV> thingy would work

Thank youSmile
#20

[eluser]Vega[/eluser]
Cool lib! Thanks very much for sharing Smile




Theme © iAndrew 2016 - Forum software by © MyBB