[Yanel-dev] Re: Use of ImageMagick with Yanel/Yarep

simon simon at 333.ch
Sun Jul 4 23:47:16 CEST 2010


hello all

i have also an image resize resource which supports resizing and 
croping. also converting formats.
see http://trac.yanel-contribution.3k3.org/wiki/image-resizer

i'm doing now a rewrite of this resource which will also allows 
inserting a watermark. it also implements the resizing as described 
here: 
http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html 


Bruno von Rotz schrieb:
> Let me add the requirements I see for the "graphics" library:
>
> a) sizing/scaling of pictures
supported
> b) potentially cropping (starting from one corner or so)
supported
> c) sharpening of pictures
probably not easy. and not a priority for me.
> d) converting formats, specifically TIFF-JPEG, PDF-JPEG
supported
> e) adding an inprint into a picture (i.e. adding the zwischengas logo 
> or (c) zwischengas or something like this)
will be supported in the rewrite
> f) adding an inprint into a PDF (i.e. adding the zwischengas logo and 
> a user specific number or so) --- this may be beyond of what any 
> graphics library can do
this is not related to an image resource.
> g) changing JPEG data reduction factor for JPEGs
supported
>
> There may be more. But if imagemagic can help us better to do these 
> things than another library, then we should stick with imagemagic.
not sure the imagemagick justifies give up of platform independence.

cheers
simon
>
> Bruno
>
> Mehmet Birgi schrieb:
>> On Fri, Jun 25, 2010 at 11:20 PM, Michael Wechner
>> <michael.wechner at wyona.com> wrote:
>>   
>>> Mehmet Birgi wrote:
>>>     
>>>> On Thu, Jun 24, 2010 at 11:10 PM, Michael Wechner
>>>> <michael.wechner at wyona.com> wrote:
>>>>
>>>>       
>>>>> Cedric Staub wrote:
>>>>>
>>>>>         
>>>>>> On Thu, 24 Jun 2010 13:47:02 +0200
>>>>>> Mehmet Birgi <mehmet.birgi at wyona.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>           
>>>>>>> Question: is there a platform independent way to integrate this into
>>>>>>> the Yanel build system?
>>>>>>>
>>>>>>>
>>>>>>>             
>>>>>> I don't think there would be an easy way to do so, considering all the
>>>>>> diffrent flavors of Linux/Unix that are out there and the various
>>>>>> package
>>>>>> managers that they use (for example, aptitude only works on
>>>>>> Debian/Ubuntu
>>>>>> systems). What you could probably do is check if ImageMagick is
>>>>>> installed
>>>>>> and if not print a warning message;
>>>>>>
>>>>>>           
>>>>> well, I would assume that im4java throws an exception
>>>>>
>>>>> @Memo: What does the log-file say if ImageMagick is not installed?
>>>>>
>>>>>         
>>>> This is the error message Bruno had forwarded. In the log, there was
>>>> nothing special/different, as far as I can remember, only longer,, and
>>>> it was possible to see that the error originated in the method
>>>> resize() of ImageScaler, but I would have to reproduce the error to
>>>> get the whole thing, if you think it would help.
>>>>       
>>> yes, I think it would help to reproduce this exception and check whether
>>> there is a possibility
>>> to catch this somehow nicely.
>>>     
>>
>> OK, I will look into this.
>>
>>   
>>> Also you might want to consider sending an email to the im4java community
>>> and ask there
>>> how to deal with such a situation.
>>>
>>> And last but not least I assume you are aware of
>>>
>>> src/contributions/resources/image/resource.xml
>>>
>>> right? This resource type allows scaling of jpg images and AFAIK it works
>>> quite well.
>>>     
>>
>> No. I wasn't aware. Frankly. I didn't check, as the custom
>> implementation was already done, and I just replaced the actual
>> resizing part. I will make a bugzilla entry in the customer project to
>> come back and check what there is, and maybe replace/use the existing
>> one. But only when we have a little more time, as for now the code is
>> working, and I would like to continue with other priorities ;-)
>>
>> But many thanks for pointing this out.
>>
>> Cheers,
>>
>> Memo
>>   
>
>
> -- 
> ______________________________
> Bruno von Rotz
> WYONA
> Hardstrasse 219 
> CH-8005 Zürich 
> Switzerland 
> P: +41 44 272 91 61 
> F: +41 44 272 91 62 
> skype: wyona-switzerland
> email: bruno.vonrotz at wyona.com
> www.wyona.com 



More information about the Yanel-development mailing list