Hi,
what do you mean with "when this GIF image stream is passed to Cocoon code it
gets transformed back to JPG"?
If you gave the complete pipeline, there is no other cocoon component involved
that could run a conversion from GIF to JPG.
Or do you mean your browser is indicating the file received being JPG or even
your OS bluntly assumes a file named '*.jpg' being JPG?
Be aware, that your browser probably does give more trust in the URL ending
with '.jpg' than the actual mime type being indicated by
cocoon. This way tricking you in believing you did get JPG.
Did you actually verify the format of the file received being JPG?
Rainer
Gaurav Kalia schrieb:
>> For that matter, you can set it in the pipelines, like:
>> <map:match pattern="favicon.ico">
>> <map:read src="resource/external/images/favicon.ico"
>> mime-type="image/vnd.microsoft.icon"/>
>> </map:match>
> This is the pipeline we are using:
>
> <map:match pattern="test.jpg">
> <map:read type="customreader"
> src="/home/user/Desktop/test.jpg" mime-type="image/gif">
> <map:parameter name="width" value="250"/>
> <map:parameter name="height" value="160"/>
> </map:read>
> </map:match>
>
> Here we are using JPG image in the src and the mime-type is set to
> image/gif. CustomReader is our reader which is transforming the image
> and converting it into GIF image.
>
> I am saving the image which has been transformed by my CustomReader at
> physical location and i can see that the JPG image got converted into
> GIF Image which is exactly what i want but when this GIF image stream is
> passed to Cocoon code it gets transformed back to JPG.
>
> I am trying to find that piece of code which is transforming the image
> back to JPG after my CustomReader.
>
> Please Suggest
>
> Luca Morandini wrote:
>> On 21/10/09 18:11, Anish wrote:
>>>
>>> But the problem is that when the gif stream is generated by our modified
>>> image reader, somewhere in the code Cocoon automatically converts its
>>> mime type to JPEG and again returns a JPEG image irrespective of the
>>> required mime-type.
>>
>> For that matter, you can set it in the pipelines, like:
>> <map:match pattern="favicon.ico">
>> <map:read src="resource/external/images/favicon.ico"
>> mime-type="image/vnd.microsoft.icon"/>
>> </map:match>
>> <map:match pattern="*.png">
>> <map:read src="resource/external/images/{1}.png"
>> mime-type="image/png"/>
>> </map:match>
>> ...etc
>>
>> --------------------
>> Luca Morandini
>> www.lucamorandini.it
>> --------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Rainer Pruy
Geschäftsführer
Acrys Consult GmbH & Co. KG
Theodor-Heuss-Str. 53-63, D-61118 Bad Vilbel
Tel: +49-6101-98760-0 Fax: +49-6101-98760-50
Web: http://www.acrys.com - Email: [email protected]
Handelsregister: Frankfurt am Main, HRA 31151
Komplementärin: Acrys Verwaltungs GmbH
Theodor-Heuss-Str. 53-63, D-61118 Bad Vilbel
Handelsregister: Frankfurt am Main, HRB 57625
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]