Tylër 0 Denunciar post Postado Setembro 24, 2010 Bom dia! Sobre o tópico: http://bakery.cakephp.org/articles/view/image-resize-helper Tentei postar lá, mas me parece que tem algum problema no campo "body", Neste trecho: $types = array( 1 => "gif", "jpeg", "png", "swf", "psd", "wbmp" ); // used to determine image type .... if ( $resize ) { $image = call_user_func( 'imagecreatefrom'.$types[$size[2]], $url ); if( function_exists("imagecreatetruecolor") && ($temp = imagecreatetruecolor ($width, $height)) ) { imagecopyresampled( $temp, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1] ); } else { $temp = imagecreate( $width, $height ); imagecopyresized( $temp, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1] ); } call_user_func( "image".$types[$size[2]], $temp, $cachefile ); imagedestroy( $image ); imagedestroy( $temp ); }Diz aqui para obter o conjunto de imagens a partir do servidor e salvar o imagecache, só que tem um bug para capturar formatos jpeg.Somente captura imagens jpg. Peço ajuda para consertar. Obrigado! screenshot: Compartilhar este post Link para o post Compartilhar em outros sites
Tylër 0 Denunciar post Postado Setembro 27, 2010 Noss... que vacilo o meu <_< function view() $total = count( $photos = glob( "$dir/{*.jpg,*.jpeg,*.gif,*.png,*.bmp}", GLOB_BRACE ) );Eu não tinha add o formato .JPEG, e por isso não ia passar a extensão para a função do helper image resize Agradeço o @kakaroto por ter descoberto isso pra mim... Abração ae cara!!:) Compartilhar este post Link para o post Compartilhar em outros sites