Hi,

I'm on ImageAPI 6.x-1.6, and ImageCache 6.x-2.0-beta8.
I can't get rounded corners to work at all. Am I missing something? I'm using png images.
Has anyone else gotten this to work? What were your steps?
Thanks.

Comments

dman’s picture

Status: Active » Postponed (maintainer needs more info)

Only local images are allowed.
... imagemagick not supported, of course.

kyle.vh’s picture

Thanks dman,
I was just able to reproduce this on a clean install. Very cool. Now I'll try it on my development site.
very helpful!

kyle.vh’s picture

dman,

On my local test site this works perfectly. But on my dev site I'm building, I can't get rounded corners to perform. I have all of the same cck/image modules enabled on both sites and they're the same versions...
I also checked and the GD versions are the same on both servers.
I've also uninstalled and reinstalled all of the cck/image modules on the dev site. I've been clearing/flushing caches every everywhere.
Do you have any thoughts?
I'm just kinda spinning my tires and trying to think of what could be going on...

dman’s picture

No clue.
With the same versions of GD even, there's not much reason for a difference like that. I'd have to double-check that the preset settings are the same (I assume you are talking about a mirror of the site? Or is it a parallal developed one?)

The gotcha with rounded corners is always - either flatten onto a color, or convert to PNG. Really.
Send in a snapshot of the settings that are not working.

kyle.vh’s picture

I found that I could get it to work, if I turned off antialising...
but then the corners are rough.

dman’s picture

Antialiasing requires a huge chunk of memory if you use it on large images. It's a VERY inefficient quick hack. (expand the image by 3x, then trim the corners, then scale /3 ).
Trimming the corners is done by looping over every pixel in the image, so that is also intensive.
Really not elegant at all.
But does the job in a few lines without re-inventing deep image filter maths.

So it looks like your issue was probably memory allocation.

Rounded corners on big pictures are a bad idea - should only be used to jazz up thumbnails.

Standart’s picture

Component: User interface » Miscellaneous
Status: Postponed (maintainer needs more info) » Fixed

This one seems to be fixed...

mkahn’s picture

i get an warning error cascade when i try to work with my settings in my background image type (i want to use the rounded corners for page backgrounds) I turned off antialiasing to avoid memory issue.

# warning: imagesavealpha(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/canvasactions.inc on line 697.
# warning: imagealphablending(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/canvasactions.inc on line 698.
# warning: imagecolortransparent(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/canvasactions.inc on line 701.
# warning: imagesx(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/canvasactions.inc on line 703.
# warning: imagesy(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/canvasactions.inc on line 704.
# warning: imagecopy(): supplied argument is not a valid Image resource in /usr/www/users/frk/mk/drupal-6.10/sites/all/modules/imagecache_actions/transparency.inc on line 128.

the giant drupal graphic is maybe not the best image to have up there for testing purposes.

I'm also wonderingt how i will implement this on a background image, which is hard coded into a style shhet no managed with the drupal adminterface.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

donquixote’s picture

Guys, check out the patch here:
Rounded Corners Speed-Up Patch for Imagecache Actions

This should work smoothly on big images and small images.