Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30358

Fix thumbnail generation for image files with MIME type image/jpx

    XMLWordPrintable

    Details

    • Tags:
    • Backlog priority:
      500

      Description

      Thumbnail generation fails when importing image files with MIME types image/jpf and image/jpx:

      2021-04-19T12:12:21,306 WARN  [Nuxeo-Work-default-2:131676470598894.1264222430] [org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory] Cannot compute document thumbnail
      org.nuxeo.ecm.core.convert.api.ConversionException: image/jpx mime type not supported by anyToThumbnail converter
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:323) ~[nuxeo-core-convert-10.10-HF34.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory.computeThumbnail(ThumbnailDocumentFactory.java:92) [nuxeo-thumbnail-10.10-HF39.jar:?]
      	at org.nuxeo.labs.indd.rendition.thumbnail.InddThumbnailFactory.computeThumbnail(InddThumbnailFactory.java:19) [nuxeo-indd-rendition-core-10.10.1.jar:?]
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailServiceImpl.computeThumbnail(ThumbnailServiceImpl.java:99) [nuxeo-core-api-10.10-HF42.jar:?]
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailAdapter.computeThumbnail(ThumbnailAdapter.java:58) [nuxeo-core-api-10.10-HF42.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.processDoc(UpdateThumbnailListener.java:72) [nuxeo-thumbnail-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.handleEvent(UpdateThumbnailListener.java:147) [nuxeo-thumbnail-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:221) [nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:493) [nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) [nuxeo-core-event-10.10-HF39.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-10.10-HF39.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
      	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
      

      Workaround:

      • normalize the MIME type with the following XML extension:
          <extension point="mimetype" target="org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService">
        
            <mimetype binary="true" iconPath="image.gif" normalized="image/jpx">
              <mimetypes>
                <mimetype>image/jpx</mimetype>
              </mimetypes>
              <extensions>
                <extension>jpx</extension>
                <extension>jpf</extension>
              </extensions>
            </mimetype>
        
          </extension>
        
      • add source MIME type with MIME type image/jpx to converters pdfAndImageToThumbnail and anyToThumbnail. Line to add to both converters:
        <sourceMimeType>image/jpx</sourceMimeType> 
        

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vdutat Vincent Dutat
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: