[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUHerds is able now to work images with Imagick 2
From: |
Nicodemo Alvaro |
Subject: |
Re: GNUHerds is able now to work images with Imagick 2 |
Date: |
Thu, 30 Apr 2009 16:06:20 -0400 |
On 4/30/09, Edgar <address@hidden> wrote:
> Hello everyone, this is my first email send to the people of GnuHerds.
> Previously this project couldn't work with the new Imagick 2 due to the lack
> support of the old APIs of the 0.9.x version, here I send the changes I made
> to make it able. Now I see that it needs some improvements in the code(code
> quality), and may be some bugs that I haven't experience. But unless works
> great for me. I'm using Ubuntu 8.04.
>
> This is the git diff result(before commit), It's long but there is:
>
> address@hidden:/var/www/gnuherds-app$ git diff
> diff --git a/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> b/Layer-2__Bu
> index 9f016bc..cf5503e 100644
> --- a/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> +++ b/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> @@ -47,8 +47,7 @@ class ViewPhotoOrLogo
> $im =
> $manager->getJobOfferPhotoOrLogoForEntity($_GET['E
>
> // Send the image to the web browser.
> - ob_start("pngOutputHandler");
> - imagepng($im,NULL);
> - ob_end_flush();
> + header('Content-Type: image/png');
> + echo $im;
> }
> }
> diff --git a/Layer-5__DB_operation/Entity.php
> b/Layer-5__DB_operation/Entity.php
> index f917be1..4e5c0b3 100644
> --- a/Layer-5__DB_operation/Entity.php
> +++ b/Layer-5__DB_operation/Entity.php
> @@ -474,9 +474,8 @@ class Entity
> public function getEntityPhotoOrLogo($Id)
> {
> $i = new Imagick("../entity_photos/".$Id);
> :
> diff --git a/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> b/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> index 9f016bc..cf5503e 100644
> --- a/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> +++ b/Layer-2__Business_logic/others/View_Photo_or_Logo.php
> @@ -47,8 +47,7 @@ class ViewPhotoOrLogo
> $im =
> $manager->getJobOfferPhotoOrLogoForEntity($_GET['EntityId']);
>
> // Send the image to the web browser.
> - ob_start("pngOutputHandler");
> - imagepng($im,NULL);
> - ob_end_flush();
> + header('Content-Type: image/png');
> + echo $im;
> }
> }
> diff --git a/Layer-5__DB_operation/Entity.php
> b/Layer-5__DB_operation/Entity.php
> index f917be1..4e5c0b3 100644
> --- a/Layer-5__DB_operation/Entity.php
> +++ b/Layer-5__DB_operation/Entity.php
> @@ -474,9 +474,8 @@ class Entity
> public function getEntityPhotoOrLogo($Id)
> {
> $i = new Imagick("../entity_photos/".$Id);
> - header( "Content-Type: image/png" );
>
> - echo $i;
> + return $i;
>
> }
>
> diff --git a/Layer-5__DB_operation/Entity.php~
> b/Layer-5__DB_operation/Entity.php~
> index a3f3a84..9d08d81 100644
> --- a/Layer-5__DB_operation/Entity.php~
> +++ b/Layer-5__DB_operation/Entity.php~
> @@ -473,10 +473,7 @@ class Entity
>
> public function getEntityPhotoOrLogo($Id)
> {
> - $i = new Imagick("../entity_photos/".$Id);
> - header( "Content-Type: image/png" );
> - //$i->setImageFormat('PNG');
> - return $i;
> + return new Imagick("../entity_photos/".$Id);
>
> }
>
>
> --
> Edgar De Jesus
>
--
Nicodemo