[Dspace-tech] Problems with JPEG media filter and Branded

125 views
Skip to first unread message

Schuster, David

unread,
Aug 26, 2015, 1:10:52 PM8/26/15
to Lista técnica do DSpace

Are there limits to the size of the JPEG that the filter will create thumbnails of?  Our Marketing department provided me some files, but they are pretty big – 10 MB and when I run media filter on it I get

 

./dspace filter-media -i 11274/446 -p "JPEG Thumbnail" -v

The following MediaFilters are enabled:

Full Filter Name: org.dspace.app.mediafilter.JPEGFilter

org.dspace.app.mediafilter.JPEGFilter

original size: 6016.0,4016.0

x scale factor: 0.013297873

new size: 80.0,53.404255

created thumbnail size: 80.0, 53.404255

Exception: Java heap space

java.lang.OutOfMemoryError: Java heap space

        at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)

        at java.awt.image.SinglePixelPackedSampleModel.createDataBuffer(SinglePixelPackedSampleModel.java:242)

        at java.awt.image.Raster.createWritableRaster(Raster.java:941)

        at java.awt.image.BufferedImage.getData(BufferedImage.java:1427)

        at java.awt.image.ConvolveOp.createCompatibleDestImage(ConvolveOp.java:280)

        at java.awt.image.ConvolveOp.filter(ConvolveOp.java:177)

        at org.dspace.app.mediafilter.JPEGFilter.getBlurredInstance(JPEGFilter.java:226)

        at org.dspace.app.mediafilter.JPEGFilter.getDestinationStream(JPEGFilter.java:148)

        at org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilterManager.java:737)

        at org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilterManager.java:561)

       at org.dspace.app.mediafilter.MediaFilterManager.filterItem(MediaFilterManager.java:511)

        at org.dspace.app.mediafilter.MediaFilterManager.applyFiltersItem(MediaFilterManager.java:479)

        at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.java:353)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225)

        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)

 

If I resize the file to 69 KB it runs the filter without a problem.

 

My memory is set to 2048 max do I need to increase that and what are the proportions?

 

David Schuster

Texas Woman's University

Director of Library Information Technology & Technical Support

Phone: 940-898-3909

dsch...@twu.edu

 

Description: emailsignature

 

Terry Brady

unread,
Aug 26, 2015, 1:10:53 PM8/26/15
to Schuster, David, dspac...@lists.sourceforge.net
I meant to CC the list...

On Monday, May 19, 2014, Terry Brady <tw...@georgetown.edu> wrote:
Try the following command to boost memory before rerunning the filter media process

 export JAVA_OPTS=-Xmx1024m

Terry


--
Sent from Gmail Mobile


--
Sent from Gmail Mobile

Jason Sherman

unread,
Aug 26, 2015, 1:10:54 PM8/26/15
to Lista técnica do DSpace
David,

I'm able to generate thumbnails for images that are hundreds of MB and my max memory is also set to 2048, so your images should be able to go without a problem.
What version of DSpace and Java are you using? Is it Oracle or OpenJDK?

Try disabling

thumbnail.blurring
and
thumbnail.hqscaling

in dspace.cfg one at a time to get a start on where the issue is.




------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



--
Jason Sherman
Systems Librarian
University of Science and Arts of Oklahoma

Schuster, David

unread,
Aug 26, 2015, 1:11:53 PM8/26/15
to Lista técnica do DSpace

After disabling

 

thumbnail.blurring

and

thumbnail.hqscaling

 

in dspace.cfg I am able to run the jpeg image filtering thank you for the tip!

Reply all
Reply to author
Forward
0 new messages