AnsweredAssumed Answered

[Solved]Created Thumbnail is size 0 bytes, nothing to see!

Question asked by sgomez on Dec 8, 2009
Latest reply on Aug 6, 2010 by chandu7ee
I can successfully create a  thumbnail (I can confirm by seeing a new child node created after running webscript) but the file is size 0 for every thumbnail I create and so there is no actual thumbnail to preview.  I tried creating thumbnails based on the OOTB thumbnail definitions as well as Mr. Pott's own thumbnail definition from his example (http://ecmarchitect.com/archives/2009/03/03/913) and all thumbnails created are the same: size 0, no preview to see).

I've installed Imagemagick and can cofirm that it works through command line.  I've also installed ghostscript for office -> pdf transformationIs (not sure if I need this).  Is there anything else I am missing?  I am currently on Enterprise 3.1.  Below is a snippet in my js webscript.  I am in the process of trying out thumbnail creation through java-backed webscripts and I'll report if this will change anything. 


     var node = search.findNode(args['node']);
     var thumbnailName = "medium";

     if (node !== null) {
          node.createThumbnail(thumbnailName, true);
     }

Below is my log4j log:
15:03:06,932 DEBUG [org.alfresco.repo.thumbnail.ThumbnailServiceImpl] Getting thumbnail by name (nodeRef=workspace://SpacesStore/b8d3888d-ddc0-49a5-a14e-48fe1f1102df; contentProperty={http://www.alfresco.org/model/content/1.0}content; thumbnailName=medium)
15:03:07,025 DEBUG [org.alfresco.repo.thumbnail.ThumbnailServiceImpl] Creating thumbnail (node=workspace://SpacesStore/b8d3888d-ddc0-49a5-a14e-48fe1f1102df; contentProperty={http://www.alfresco.org/model/content/1.0}content; mimetype=image/jpeg
15:03:07,025 DEBUG [org.alfresco.repo.thumbnail.ThumbnailServiceImpl] Getting thumbnail by name (nodeRef=workspace://SpacesStore/b8d3888d-ddc0-49a5-a14e-48fe1f1102df; contentProperty={http://www.alfresco.org/model/content/1.0}content; thumbnailName=medium)
15:03:07,119 DEBUG [org.alfresco.repo.content.transform.ContentTransformerRegistry] Searched for transformer:
   source mimetype: image/png
   target mimetype: image/jpeg
   transformers: [ImageMagickContentTransformer[ average=0ms]]
15:03:07,135 DEBUG [org.alfresco.repo.content.transform.ContentTransformerRegistry] Searched for transformer:
   source mimetype: image/png
   target mimetype: image/jpeg
   transformers: [ImageMagickContentTransformer[ average=0ms]]
15:03:07,197 DEBUG [org.alfresco.util.exec.RuntimeExec] Execution result:
   os:         Windows XP
   command:    [C:/devtools/ImageMagick-6.5.7-Q16/imconvert, C:\devtools\apache-tomcat-6.0.18\temp\Alfresco\ImageMagickContentTransformer_source_6794085110837159309.png[0], -thumbnail, 100x100, C:\devtools\apache-tomcat-6.0.18\temp\Alfresco\ImageMagickContentTransformer_target_9019625159893596094.jpg]
   succeeded:  true
   exit code:  -1072365564
   out:       
   err:       
15:03:07,197 DEBUG [org.alfresco.repo.content.transform.magick.ImageMagickContentTransformer] ImageMagic executed successfully:
RuntimeExec:
   command:    C:/devtools/ImageMagick-6.5.7-Q16/imconvert ${source} SPLIT:${options} ${target}
   env props:  [Ljava.lang.String;@1b68215
   dir:        null
   os:         Windows XP

15:03:07,197 DEBUG [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] Transformation completed:
   source: ContentAccessor[ contentUrl=store://2009/11/6/15/10/084d8016-2c73-4100-b19b-3c97ae35039f.bin, mimetype=image/png, size=53099, encoding=null, locale=en_US]
   target: ContentAccessor[ contentUrl=store://2009/12/7/15/3/06ffacba-e782-46cd-b87f-91f3a8488ef1.bin, mimetype=image/jpeg, size=0, encoding=null, locale=en_US]
   options: org.alfresco.repo.content.transform.magick.ImageTransformationOptions@ef107a
15:03:07,213 DEBUG [org.alfresco.repo.content.transform.AbstractContentTransformer2] Completed transformation:
   reader: ContentAccessor[ contentUrl=store://2009/11/6/15/10/084d8016-2c73-4100-b19b-3c97ae35039f.bin, mimetype=image/png, size=53099, encoding=null, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2009/12/7/15/3/06ffacba-e782-46cd-b87f-91f3a8488ef1.bin, mimetype=image/jpeg, size=0, encoding=null, locale=en_US]
   options: org.alfresco.repo.content.transform.magick.ImageTransformationOptions@ef107a
   transformer: ImageMagickContentTransformer[ average=78ms]
15:03:07,213 DEBUG [org.alfresco.repo.content.transform.ContentTransformerRegistry] Searched for transformer:
   source mimetype: image/jpeg
   target mimetype: text/plain
   transformers: []

Outcomes