Hi Carsten, hier das script um bikubische Interpolation manuell zu erzwingen (für ältere gd-lib-versionen) [snipped but not skipped] > > schick, schick... *lol* > aber ich meinte eigentlich den link fuer das bicubic-resize-php-script... > --- BEGIN PHP-SCRIPT --- jernberg@fairytale.se 15-Feb-2001 06:02 [Ed. note: if you're using GD 2.x, you can use imagecopyresampled() which does exactly the same thing] Here is my addition to imagecopyresized it implements bicubic interpolation of pixels so the result is much better than the ordinary imagecopyresized ... copy it into the src/ext/gd/gc.c and recompile the lib. i wish someone could do that so it's included in the "official" release it's a really good function to scale down pictures to thumbnails. /* {{{ proto int imagecopyresizedbicubic(int dst_im, int src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h) Copy and resize part of an image */ PHP_FUNCTION(imagecopyresizedbicubic) { zval **SIM, **DIM, **SX, **SY, **SW, **SH, **DX, **DY, **DW, **DH; gdImagePtr im_dst, im_src; int srcH, srcW, dstH, dstW, srcY, srcX, dstY, dstX; int i, j; int r, g, b, c1,c2,c3,c4,color; float sX, sY; float scaleX,scaleY,scaleX2,scaleY2; GDLS_FETCH(); if (ZEND_NUM_ARGS() != 10 || zend_get_parameters_ex(10, &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH, &SW, &SH) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(im_dst, gdImagePtr, DIM, -1, "Image", le_gd); ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, "Image", le_gd); convert_to_long_ex(SX); convert_to_long_ex(SY); convert_to_long_ex(SW); convert_to_long_ex(SH); convert_to_long_ex(DX); convert_to_long_ex(DY); convert_to_long_ex(DW); convert_to_long_ex(DH); srcX = Z_LVAL_PP(SX); srcY = Z_LVAL_PP(SY); srcH = Z_LVAL_PP(SH); srcW = Z_LVAL_PP(SW); dstX = Z_LVAL_PP(DX); dstY = Z_LVAL_PP(DY); dstH = Z_LVAL_PP(DH); dstW = Z_LVAL_PP(DW); // kopiera paletten for( i=0; i<256; i++ ) { gdImageColorAllocate( im_dst, im_src->red[i], im_src->green[i], im_src->blue[i] ); }; // gdImageCopyResized(im_dst, im_src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH); scaleX = (float)(srcW-1) / (float)dstW; scaleY = (float)(srcH-1) / (float)dstH; scaleX2 = scaleX/2.0f; scaleY2 = scaleY/2.0f; for( j=0; jred[c1] + im_src->red[c2] + im_src->red[c3] + im_src->red[c4]) / 4; g = (im_src->green[c1] + im_src->green[c2] + im_src->green[c3] + im_src->green[c4]) / 4; b = (im_src->blue[c1] + im_src->blue[c2] + im_src->blue[c3] + im_src->blue[c4]) / 4; color=gdImageColorClosest(im_dst,r,g,b); gdImageSetPixel( im_dst, (i+dstX),(j+dstY), color ); }; }; RETURN_TRUE; } --- END PHP-SCRIPT --- Ich hoffe Du kannst etwas damit anfangen. regards, Till