cotonti.com : Thumbnails https://www.cotonti.com Последние сообщения в теме Cotonti en Thu, 27 Nov 2025 22:36:24 -0000 chobblr
.div IMG {box-shadow: 2px 2px 5px #000;} but only a few browsers will see it
or i could try
.div IMG {padding-right:4px;padding-bottom:4px;background-image:URL('dropshadowimage.png')} all browsers will see

but..both have there pros and cons, if i where to hard code it in it should be see able on all browsers and using no more images than before..]]>
вт, 19 мая 2009 22:03:06 -0000
Elgan
I did write some code , experimental to create hard coded rounded thumbs, it;s in medlib but it had a lil prob with some that got cought up int he transparency ont he edge

http://www.cotonti.com/forums.php?m=posts&p=10939&highlight=ROUNDED#10939

its not the best.

i found a lil class that has uses gd and has a couple of thumbnail effetc,s rounding, shadows etc. without CSS.

I might add it to medlib with options to add the effects to thumbnails.

However it is always possible to do all of that with CSS. It's an arguement which is better for the same effect, hard coding and creating it, or css?]]>
вт, 19 мая 2009 06:59:32 -0000
chobblr
$image_file = $_GET['src'];
$corner_radius = isset($_GET['radius']) ? $_GET['radius'] : 20; // The default corner radius is set to 20px
$angle = isset($_GET['angle']) ? $_GET['angle'] : 0; // The default angle is set to 0º
$topleft = (isset($_GET['topleft']) and $_GET['topleft'] == "no") ? false : true; // Top-left rounded corner is shown by default
$bottomleft = (isset($_GET['bottomleft']) and $_GET['bottomleft'] == "no") ? false : true; // Bottom-left rounded corner is shown by default
$bottomright = (isset($_GET['bottomright']) and $_GET['bottomright'] == "no") ? false : true; // Bottom-right rounded corner is shown by default
$topright = (isset($_GET['topright']) and $_GET['topright'] == "no") ? false : true; // Top-right rounded corner is shown by default

$images_dir = 'images/';
$corner_source = imagecreatefrompng('images/rounded_corner.png');

$corner_width = imagesx($corner_source);  
$corner_height = imagesy($corner_source);  
$corner_resized = ImageCreateTrueColor($corner_radius, $corner_radius);
ImageCopyResampled($corner_resized, $corner_source, 0, 0, 0, 0, $corner_radius, $corner_radius, $corner_width, $corner_height);

$corner_width = imagesx($corner_resized);  
$corner_height = imagesy($corner_resized);  
$image = imagecreatetruecolor($corner_width, $corner_height);  
$image = imagecreatefromjpeg($images_dir . $image_file); // replace filename with $_GET['src'] 
$size = getimagesize($images_dir . $image_file); // replace filename with $_GET['src'] 
$white = ImageColorAllocate($image,255,255,255);
$black = ImageColorAllocate($image,0,0,0);

// Top-left corner
if ($topleft == true) {
    $dest_x = 0;  
    $dest_y = 0;  
    imagecolortransparent($corner_resized, $black); 
    imagecopymerge($image, $corner_resized, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100);
} 

// Bottom-left corner
if ($bottomleft == true) {
    $dest_x = 0;  
    $dest_y = $size[1] - $corner_height; 
    $rotated = imagerotate($corner_resized, 90, 0);
    imagecolortransparent($rotated, $black); 
    imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100);  
}

// Bottom-right corner
if ($bottomright == true) {
    $dest_x = $size[0] - $corner_width;  
    $dest_y = $size[1] - $corner_height;  
    $rotated = imagerotate($corner_resized, 180, 0);
    imagecolortransparent($rotated, $black); 
    imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100);  
}

// Top-right corner
if ($topright == true) {
    $dest_x = $size[0] - $corner_width;  
    $dest_y = 0;  
    $rotated = imagerotate($corner_resized, 270, 0);
    imagecolortransparent($rotated, $black); 
    imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100);  
}

// Rotate image
$image = imagerotate($image, $angle, $white);

// Output final image
imagejpeg($image);

imagedestroy($image);  
imagedestroy($corner_source);
]]>
вт, 19 мая 2009 04:11:33 -0000
Lombi http://documentation.coppermine-gallery.net/en/install_faq.htm#GD1vsGD2]]> вт, 19 мая 2009 04:07:43 -0000 chobblr
Edit: Dont you mean GD1]]>
вт, 19 мая 2009 03:51:04 -0000
Lombi вт, 19 мая 2009 03:47:34 -0000 chobblr http://google.com"]]> вт, 19 мая 2009 03:44:56 -0000 Lombi вт, 19 мая 2009 03:42:04 -0000 chobblr вт, 19 мая 2009 03:30:17 -0000 Lombi вт, 19 мая 2009 03:24:19 -0000 chobblr вт, 19 мая 2009 03:07:12 -0000 Joy вт, 19 мая 2009 03:01:51 -0000 chobblr
what i want to do is just change some things like rounded corners and drop shadows, i no this can be done in css but is there a way to hard code it in stead,


where you see the grey/black backgrounds with the rounded corners that is done by CSS but i would like that on the thumbnails, is this possible]]>
вт, 19 мая 2009 02:59:16 -0000