Hi,
I’m trying to make the round corners transparent on a png file. Is there any way to specify transparent color for the corners?
Thanks
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 20, 2010 11:10am
Subscribe [38]#76 / Nov 03, 2011 4:17pm
Hi,
I’m trying to make the round corners transparent on a png file. Is there any way to specify transparent color for the corners?
Thanks
#77 / Nov 04, 2011 5:09am
Is the source transparent?
#78 / Nov 04, 2011 10:24am
No, the png is not transparent. I found a solution that works pretty well: http://www.exorithm.com/algorithm/view/round_corners
It would be great if image_moo had the same kind of algorithm built in.
#79 / Nov 04, 2011 3:16pm
I’ve decided to fork the project. I’ve posted it on Github. If anyone else would like to contribute code to clean up or improve, feel free under the MIT license.
https://github.com/darkness/codeigniter-image-moo
#80 / Dec 19, 2011 11:36am
Hi,
Could you add support for ImageMagick and the ability to set a master dimension (for example width)?
#81 / Feb 29, 2012 2:56pm
Out of curiosity, when I try to watermark a image, it saves the image but never makes the watermark work. From what I’ve read am I doing this correctly
Quick Edit
$this->watermark_text = string
$this->watermark_font = realpath ( APPPATH . ‘../../assets/fonts/Sniglet-webfont.ttf’);
$this->load->library('pictures/image_moo');
if ( $this->do_watermark === false )
{
$this->image_moo->load( $fullpath )
->resize( $this->image_width, $this->image_height )->save( $this->image_path . '/' . $filename . $fileext )
->resize($this->large_thumb_width, $this->large_thumb_height )->save( $this->image_path . '/thumbs/' . $filename . '_medium' . $fileext )
->resize($this->small_thumb_width, $this->small_thumb_height )->save( $this->image_path . '/thumbs/' . $filename . '_small' . $fileext );
} else {
$this->image_moo->load( $fullpath )
->make_watermark_text( $this->watermark_text , $this->watermark_font , 16, '#000')
->resize( $this->image_width, $this->image_height )->save( $this->image_path . '/' . $filename . $fileext , true)
->watermark(2)
->make_watermark_text( $this->watermark_text , $this->watermark_font , 12, '#000' )
->resize($this->large_thumb_width, $this->large_thumb_height )->save( $this->image_path . '/thumbs/' . $filename . '_medium' . $fileext, true )
->watermark(2)
->make_watermark_text( $this->watermark_text , $this->watermark_font , 9, '#000' )
->resize($this->small_thumb_width, $this->small_thumb_height )->save( $this->image_path . '/thumbs/' . $filename . '_small' . $fileext , true)
->watermark(2);
}Thanks
Nevermind I just noticed my watermark’s were after the saves duh
$this->image_moo->load( $fullpath )
->make_watermark_text( $this->watermark_text , $this->watermark_font , 16, '#000')
->resize( $this->image_width, $this->image_height )->watermark(2)
->save( $this->image_path . '/' . $filename . $fileext , true)
->make_watermark_text( $this->watermark_text , $this->watermark_font , 12, '#000' )
->resize($this->large_thumb_width, $this->large_thumb_height )
->watermark(2)
->save( $this->image_path . '/thumbs/' . $filename . '_medium' . $fileext, true )
->make_watermark_text( $this->watermark_text , $this->watermark_font , 9, '#000' )
->resize($this->small_thumb_width, $this->small_thumb_height )
->watermark(2)
->save( $this->image_path . '/thumbs/' . $filename . '_small' . $fileext , true);Proper method of doing it
#82 / Feb 29, 2012 3:20pm
Have you tried seeing if there is any errors? if ($this->image_moo->errors) print $this->image_moo->display_errors();
#83 / Feb 29, 2012 3:30pm
Have you tried seeing if there is any errors? if ($this->image_moo->errors) print $this->image_moo->display_errors();
I’m sorry, I found the bug lol, I was saving the image then calling watermark. Operator error lol
#84 / Feb 29, 2012 3:40pm
Lol, no worries, glad you like the library. Got a slightly updated version to post
#85 / Mar 05, 2012 12:17pm
Your library has been a life saver for me. I love it.
#86 / Mar 21, 2012 12:29pm
I’m using image moo in my application, but I’ve noticed a very small but noticeable effect on resizing images. When I resize a gif image with a white background, there seems to be a slight blue/green tint on the background.
Example of original and resized here: http://imgur.com/a/cxPfl#0
The only processing I do is:
$pad = true;
$ci->image_moo->resize($image_preset['width'], $image_preset['height'], $pad);Is this an issue in the library? Php? Or my side?
#87 / Mar 23, 2012 8:34pm
I’m using image moo in my application, but I’ve noticed a very small but noticeable effect on resizing images. When I resize a gif image with a white background, there seems to be a slight blue/green tint on the background.
Example of original and resized here: http://imgur.com/a/cxPfl#0
The only processing I do is:
$pad = true; $ci->image_moo->resize($image_preset['width'], $image_preset['height'], $pad);Is this an issue in the library? Php? Or my side?
http://www.howtoforge.com/forums/archive/index.php/t-25085.html
#88 / Mar 26, 2012 9:58am
@web-johnny
I’m sorry, but I’m not very familiar with image terminology. What exactly does this mean?
You are using an interpolated resizing operation. Either use a non-interpolating resizing operation instead, or do not create a true colour destination image.#89 / Mar 27, 2012 2:57am
This simply means:
1. You have to convince your customer to not upload gif images (suggested)
or 2. Create your own crop without using the image moo. This means from scratch (google will help you with this).
or 3. Change the functionality of image moo and share the code so other people know 😊
I just wanted to say that this is not a BUG, it is let’s say an extra feature.
By the way the images in my screen looks the same (I know they aren’t).
So it’s up to the developer if he wants to add this feature. In my opinion it’s ok and the image moo ROCKS 😊 , I use it all the time.
#90 / May 26, 2012 3:46am
Thanks web-johnny 😊 I’ve got some amends to post few tweaks etc.