Rounded Corners

kyle.vh - April 24, 2009 - 17:56
Project:Imagecache Actions
Version:6.x-1.5
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

dman - April 25, 2009 - 23:39
Status:active» postponed (maintainer needs more info)


... imagemagick not supported, of course.

#2

kyle.vh - April 29, 2009 - 17:12

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!

#3

kyle.vh - April 29, 2009 - 19:28

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...

#4

dman - April 29, 2009 - 23:23

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.

#5

kyle.vh - May 7, 2009 - 21:04

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

#6

dman - May 7, 2009 - 21:18

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.

#7

Standart - August 11, 2009 - 21:56
Component:User interface» Miscellaneous
Status:postponed (maintainer needs more info)» fixed

This one seems to be fixed...

#8

mkahn - August 12, 2009 - 19:57

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.

#9

System Message - August 26, 2009 - 20:00
Status:fixed» closed

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

#10

donquixote - August 31, 2009 - 02:16

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

This should work smoothly on big images and small images.

 
 

Drupal is a registered trademark of Dries Buytaert.