After a couple of days disconnected from this issue, today I came back to 
it determined to solve it.

Turns out the problem really is the imagemagick delegates and there's a bug 
in the Debian Jessie package install:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773530

After going nowhere with source installs and going around in circles, I 
decided to point my package repositories to Debian Wheezy and install 
imagemagick from those packages. Voilá, the version installed is 6.7.7 and 
jp2 delegate comes with it. After running [dspace]bin/dspace filter-media 
-i (some-record-with-jp2-file-attached) it's working just fine.

Anyways, this is how I got around to it. If someone else got around this in 
a better way, please do share.

Thank you,

Pedro Amorim


quinta-feira, 20 de Outubro de 2016 às 14:53:46 UTC, Pedro Amorim escreveu:
>
> Hello Gerard,
>
> Thank you so much for your reply.
> I actually made some progress after I first posted this question and it 
> has directly to do with what you're referring.
>
> 1) You see, I installed imagemagick on my local workstation just for 
> testing, and the convert -list configure:
> DELEGATES     bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 
> lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib
> Whereas running the same command on my DSpace server, after packages 
> install, lists a different set of delegates where jp2 is missing.
>
> After that, I manually tested the convert jp2 to jpeg. Worked fine in my 
> workstation but failed in the DSpace.
> The confusing part for me was the message *convert: no decode delegate 
> for this image format `TMP'* but after a couple of tests, imagemagick 
> uses the mimetype to check if it can work with it but it will print the 
> file extension on error, because filter-media in DSpace creates .tmp 
> images, the error message was not obvious at first.
>
> 2) Once I checked that jp2 wasn't available on DSpace server but it was on 
> my workstation, it's time to look at imagemagick itself.
> I'm running Ubuntu 14.04 on my workstation and it installs Imagemagick 
> version 6.7.7
> On the DSpace server running Debian Jessie 8, it installs Imagemagick 
> 6.8.9 (I wasn't sucessfull when I tried downgrading it to 6.7.7 in debian 
> jessie, seems only 6.8.9 is available)
>
> From what I understand, each version has a different subset of available 
> delegates.
>
> 3) So, I decided to uninstall Imagemagick from the DSpace server and 
> install it from source following this guide 
> http://www.imagemagick.org/script/install-source.php
> After installing from source, the version is now 7.0.3 and there's only 2 
> delegates available *mpeg x*. I think source installs come with no 
> delegates and they need to be added manually. Which is a pain. I haven't 
> found an easy to install all delegates, or at least all common delegates. 
> Because now, not only I need to figure out how to manually add jp2 delegate 
> to source install but I also need to add every other delegate also need 
> (png, tiff, etc).
>
> I've hit a couple of dead-ends and right now I'm stumped.
>
> Any suggestions?
>
> Sorry for long text and thank you,
>
> Pedro Amorim
>
>
> quinta-feira, 20 de Outubro de 2016 às 13:49:56 UTC, Gerard Suades 
> escreveu:
>>
>> Hi Pedro,
>>
>> Just guessing, make sure you have the appropiate jpeg 2000 delegates 
>> (encoders) on your image magick installation as some of them might not be 
>> enabled/installed by default.
>>
>> You can see the delegates list with this command.
>> $ convert -list configure
>>
>> You can see a list of enabled decoders (r) / encoders (w) with this 
>> command.
>> $ convert -list format
>>
>> Hope this helps,
>>
>> --Gerard
>>
>> El 19/10/16 a les 14:16, Pedro Amorim ha escrit:
>>
>> Hello everyone, 
>>
>> I have been trying to generate thumbnails from JPEG 2000 files in DSpace 
>> but have been unsuccessfull thus far.
>>
>> *1) I have installed jai and jai_image 
>> from http://data.opengeo.org/suite/jai/ 
>> <http://data.opengeo.org/suite/jai/>*
>> *2) Thumbnails from PDF and TIFF are working just fine*
>> *3) I have added JPEG 2000 bitstream format in DSpace as name 'JPEG 
>> 2000', mimetype 'image/jp2', known format and extension 'jp2'*
>> *4) This is my dspace.cfg file:*
>>
>> plugin.named.org.dspace.app.mediafilter.FormatFilter = \
>>   org.dspace.app.mediafilter.PDFFilter = PDF Text Extractor, \
>>   org.dspace.app.mediafilter.HTMLFilter = HTML Text Extractor, \
>>   org.dspace.app.mediafilter.WordFilter = Word Text Extractor, \
>>   org.dspace.app.mediafilter.PowerPointFilter = PowerPoint Text 
>> Extractor, \
>>   org.dspace.app.mediafilter.JPEGFilter = JPEG Thumbnail, \
>>   org.dspace.app.mediafilter.BrandedPreviewJPEGFilter = Branded Preview 
>> JPEG, \
>>   org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter = 
>> ImageMagick Image Thumbnail, \
>>   org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter = ImageMagick 
>> PDF Thumbnail
>>
>> #Configure each filter's input format(s)
>> filter.org.dspace.app.mediafilter.PDFFilter.inputFormats = Adobe PDF
>> filter.org.dspace.app.mediafilter.HTMLFilter.inputFormats = HTML, Text
>> filter.org.dspace.app.mediafilter.WordFilter.inputFormats = Microsoft Word
>> filter.org.dspace.app.mediafilter.PowerPointFilter.inputFormats = 
>> Microsoft Powerpoint, Microsoft Powerpoint XML
>> filter.org.dspace.app.mediafilter.JPEGFilter.inputFormats = BMP, GIF, 
>> JPEG, image/png, image/tiff, TIFF
>> filter.org.dspace.app.mediafilter.BrandedPreviewJPEGFilter.inputFormats = 
>> BMP, GIF, JPEG, image/png
>> filter.org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter.inputFormats
>>  
>> = BMP, GIF, image/png, JPG, TIFF, JPEG, JPEG 2000
>> filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats 
>> = Adobe PDF
>>
>> *5) The error displaying when I run the filter-media command specifically 
>> for an handle with JPEG 2000 bitsream is as follows:*
>> org.im4java.core.CommandException: org.im4java.core.CommandException: 
>> convert: no decode delegate for this image format `TMP' @ 
>> error/constitute.c/ReadImage/501.
>> org.im4java.core.CommandException: org.im4java.core.CommandException: 
>> convert: no decode delegate for this image format `TMP' @ 
>> error/constitute.c/ReadImage/501.
>> at org.im4java.core.ImageCommand.run(ImageCommand.java:219)
>> at 
>> org.dspace.app.mediafilter.ImageMagickThumbnailFilter.getThumbnailFile(ImageMagickThumbnailFilter.java:126)
>> at 
>> org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter.getDestinationStream(ImageMagickImageThumbnailFilter.java:37)
>> at 
>> org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilterManager.java:734)
>> at 
>> org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilterManager.java:550)
>> ....
>>
>> Am I missing some other step? Haven't found real documentation on this.
>>
>> Thank you,
>>
>> Pedro Amorim
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dspace-tech...@googlegroups.com.
>> To post to this group, send email to dspac...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> ------------------------------
>>
>>  
>>
>> Gerard Suades Méndez 
>>
>> Tècnic de Projectes
>>
>> Consorci de Serveis Universitaris de Catalunya (CSUC) 
>>
>>  
>>
>> Gran Capità, 2 (Edifici Nexus) ● 08034 Barcelona
>>
>> T. 93 551 6220 ● F. 93 205 6979 ● gerard...@csuc.cat
>>
>>  
>>
>> www.csuc.cat ● Twitter @CSUC_info ● Facebook ● Linkedin
>>
>> Subscriu-te al butlletí (www.csuc.cat/butlleti)
>>
>>  
>> ------------------------------
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to