Hello, I did a bit of testing and it seems that this problem with arises when an item has a JPG in the ORIGINAL bundle. The "ImageMagick PDF Thumbnail" plugin will process both PDFs and JPGs if they are present in the ORIGINAL bundle, despite being configured to only process "Adobe PDF" input formats. In our case we have some JPGs in the ORIGINAL bundle because editors had manually created thumbnails and uploaded them during item submission, but this is beside the issue.
- Item with a PDF in the ORIGINAL bundle: $ [dspace]/bin/dspace filter-media -f -i 10568/16881 -p "ImageMagick PDF Thumbnail" -v The following MediaFilters are enabled: Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter IM Thumbnail earlywinproposal_esa_postharvest.pdf is replacable. File: earlywinproposal_esa_postharvest.pdf.jpg IM Image Param: /tmp/impdfthumb6654586450122351471.pdf[0] -flatten /tmp/impdfthumb6654586450122351471.pdf.jpg IM Thumbnail Param: /tmp/impdfthumb6654586450122351471.pdf.jpg -thumbnail 300x300 /tmp/impdfthumb6654586450122351471.pdf.jpg.jpg FILTERED: bitstream 13787 (item: 10568/16881) and created 'earlywinproposal_esa_postharvest.pdf.jpg' - Item with a JPG in the ORIGINAL bundle: $ [dspace]/bin/dspace filter-media -f -i 10568/33941 -p "ImageMagick PDF Thumbnail" -v The following MediaFilters are enabled: Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter Generated Thumbnail strengtheningPig.jpg matches pattern and is replacable. File: strengtheningPig.jpg.jpg IM Image Param: /tmp/impdfthumb5315798183586620841.pdf[0] -flatten /tmp/impdfthumb5315798183586620841.pdf.jpg IM Thumbnail Param: /tmp/impdfthumb5315798183586620841.pdf.jpg -thumbnail 300x300 /tmp/impdfthumb5315798183586620841.pdf.jpg.jpg FILTERED: bitstream 23121 (item: 10568/33941) and created 'strengtheningPig.jpg.jpg' - Item with a JPG in the THUMBNAIL bundle (manually uploaded after item submission): $ [dspace]/bin/dspace filter-media -f -i 10568/24655 -p "ImageMagick PDF Thumbnail" -v The following MediaFilters are enabled: Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter The expected behavior is that the "ImageMagick PDF Thumbnail" plugin should not process JPGs, but it does process them when they are in the ORIGINAL bundle, despite its configuration in dspace.cfg. We are using DSpace 5.5. I will file an issue on Jira. Regards, On Tue, Feb 21, 2017 at 11:08 AM Alan Orth <[email protected]> wrote: I think I found a bug in filter-media. I'm trying to force the re-generation of all PDF thumbnails in a collection by limiting the filter-media command to the ImageMagick PDF Thumbnail plugin, but I see it still processing JPGs: --- $ [dspace]/bin/dspace filter-media -f -i 10568/16856 -p "ImageMagick PDF Thumbnail" ... File: EnvtNaturalRes.jpg.jpg FILTERED: bitstream 80165 (item: 10568/76133) and created 'EnvtNaturalRes.jpg.jpg' File: zemadim_2016.pdf.jpg FILTERED: bitstream 85076 (item: 10568/77324) and created 'zemadim_2016.pdf.jpg' --- The configuration for filter-media's ImageMagick plugins is: --- 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 --- The expected behavior is that filter-media only processes bitstreams matching the input formats listed in the plugin's configuration. In my case I would be generating thumbnails for thousands of items and so this creates lots of extra I/O and wastes CPU cycles. We are running DSpace version 5.5. Thank you, -- Alan Orth [email protected] https://englishbulgaria.net https://alaninkenya.org https://mjanja.ch -- Alan Orth [email protected] https://englishbulgaria.net https://alaninkenya.org https://mjanja.ch -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
