[REPO-906] Community: Apply patch provided in ALF-21600 (resizeToThumbnail property) Created: 07-Jul-16  Updated: 11-Jun-20  Resolved: 09-Oct-18

Status: Done
Project: Repository
Component/s: Transformations
Affects Version/s: Alfresco One 5.0
Fix Version/s: None

Type: Bug
Reporter: Ian Williams Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: CommunityPainPoints
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File alfresco-repository.patch    
Issue Links:
Related
relates to ALF-21600 Defining the property resizeToThumbna... Closed
Bug Priority:
Category 2
ACT Numbers:

Community

Work Funnel: Maintenance
Story Points: 0
Template:

 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.


 Comments   
Comment by Richard Esplin [X] (Inactive) [ 07-Jul-16 ]

A related conversation is here:
https://forums.alfresco.com/forum/developer-discussions/repository-services/current-method-adding-rendition-definition-thumbnail

Comment by Ray Gauss [X] (Inactive) [ 07-Jul-16 ]

Note that there is a class to help add definitions to the thumbnail registry.

Generated at Thu Jul 09 10:14:58 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.