Uploaded image for project: 'Repository'
  1. Repository
  2. REPO-906

Community: Apply patch provided in ALF-21600 (resizeToThumbnail property)

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      Community

    • Work Funnel:
      Maintenance
    • Story Points:
      0

      Description

      Create a thumbnail definition such as used in the Gallery Plus dashlet:

      <!-- Thumbnail definition "galpThumb120" for thumbnails with a height of 120 pixels -->
      	<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
      		<property name="targetObject" ref="thumbnailRegistry" />
      		<property name="targetMethod" value="addThumbnailDefinition" />
      		<property name="arguments">
      			<list>
      				<bean class="org.alfresco.repo.thumbnail.ThumbnailDefinition">
      					<property name="name" value="galpThumb120" />
      					<property name="mimetype" value="image/jpeg" />
      					<property name="transformationOptions">
      						<bean
      							class="org.alfresco.repo.content.transform.magick.ImageTransformationOptions">
      							<property name="resizeOptions">
      								<bean
      									class="org.alfresco.repo.content.transform.magick.ImageResizeOptions">
      									<property name="height" value="120" />
      									<property name="width" value="4000" />
      									<property name="maintainAspectRatio" value="true" />
      									<property name="resizeToThumbnail" value="true" />
      								</bean>
      							</property>
      						</bean>
      					</property>
      					<property name="placeHolderResourcePath"
      						value="alfresco/extension/thumbnail/thumbnail_placeholder_galpThumb120.jpg" />
      				</bean>
      			</list>
      		</property>
      	</bean>
      

      Note resizeToThumbnail=true.
      The ImageMagick command line produced is:

      command: /home/ian/work/ImageMagick/convert /home/ian/work/Gallery_Plus_Dashlet_IPW/gallery_plus-repo/target/Alfresco/ImageMagickContentTransformerWorker_source_7082732122820643958.png[0] -alpha remove -auto-orient -resize 4000x120 /home/ian/work/Gallery_Plus_Dashlet_IPW/gallery_plus-repo/target/Alfresco/ImageMagickContentTransformerWorker_target_8091252949361762254.jpg

      The -resize option should be -thumbnail.

      I believe the attached patch fixes the issue.

      Questions:

      • none -

      Implemementation notes:

      • Evaluate if the patch is the correct solution
      • If so, apply the patch
      • If not, then give feedback to the reporter on why the patch is not the correct approach and what we think a better solution would be.
      • If we have a recommendation for a better solution, then raise a new story for us to make the proper fix so it can be prioritized unless it is easy enough to address immediately.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                IanW Ian Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: