Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21600

Defining the property resizeToThumbnail in a thumbnail definition bean has no effect

    Details

    • Patch Attached:
      Yes
    • Triage:
      ACE
    • Resolution Time Custom Field:
      130 weeks, 4 days, 17 hours, 18 minutes, 22 seconds

      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.

        Attachments

          Issue Links

            Structure

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Date of First Response:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 10 minutes
                    10m

                      Structure Helper Panel