Login  |  Register
 
You are here February 08, 2012  
Welcome to the EMuUsers discussion forums. All registered users are encouraged to post new topics and also to participate in existing discussions.

* You must register first if you wish to make postings.
* You can subscribe to one or more forums to receive email notification when new messages are posted.
* Click on a correspondent’s name to find out their title and institution.
Subject: MM thumbnails and reports: resolution issues
Prev Next
You are not authorized to post a reply.

Author Messages
Joanna McCaffrey
Posts:40

09-07-2008 2:52 AM Alert 
One of our users had the following observation, and complaint, and I was wondering if anyone has encountered the same, and found a satisfactory workaround - samples of images in Crystal reports are included.

There is a bug with the EMu thumbnail generation as it affects Crystal Reports.

The thumbnails generate correct pixel dimensions (<=90 pixels), but CR also takes into account the *resolution* (dpi) of the thumbnail in displaying an image.

1. If the resolution of the thumbnail is 72 dpi the thumbnail image displays fine in CR.
2. However, if the resolution of the thumbnail is 300 dpi, then the thumbnail renders *tiny* in CR. If the resolution is 600 dpi, then it display *microscopic*.
3. It appears that the resolution of the thumbnail is taken from the resolution of the imported image (thus, if the imported image is 300 dpi, the resolution of the thumbnail will be 300 dpi).

This bug does not affect

There are two possible fixes:

A. Change resolution of all imported images to 72 dpi prior to doing the import.

This option is not desirable since it would involve changing the resolution (and hence the implied dimensions) of scanned images.

B. Alter the resolution of the thumbnail during thumbnail generation so that the resolution of the thumbnail is 72 dpi.

Given that thumbnail generation is being performed by ImageMagick, this second option is trivial and only requires the insertion of the -density 72 into the ImageMagick commandline.

Attachment: Treatment - all thumbnails 72 DPI.pdf
Attachment: Treatment - BT are 72DPI, AT are 300 DPI.pdf

Larry Gall
Posts:8

09-07-2008 7:27 AM Alert 
Joanna,

Assuming you have ImageMagick on your server, you could cron a nightly script to run convert's -density option on thumbnails. Here is a simplistic one you can modify, I cron it nightly to insure that unneeded profiles are chopped out of thumbnails generated that day (makes them truly tiny).

Larry


#!/bin/bash
repository="/multimedia/images" # path to your EMu Multimedia Repository
rm="/usr/bin/rm" # path to your version of rm
cp="/usr/bin/cp" # path to your version of cp
awk="/usr/bin/awk" # path to your version of awk
echo="/usr/bin/echo" # path to your version of echo
find="/usr/bin/find" # path to your version of find
touch="/usr/bin/touch" # path to your version of touch
convert="/usr/local/bin/convert" # where convert lives

MAGICK_HOME="/usr/local/imagemagick"
PATH="/usr/bin:/usr/local/bin:/usr/local/imagemagick/bin:/sbin"
LD_LIBRARY_PATH="/usr/local/lib:/usr/local/imagemagick/lib:/usr/lib"

export MAGICK_HOME PATH LD_LIBRARY_PATH

tmpfile="/tmp/emuthumb"$$".jpg"
files=`$find $repository -name '*.thumb.jpg' -mtime -1 -print`
for source in $files
do
target=`$echo $source | $awk 'BEGIN {FS = "."} { print $1 }'`
target=$target.thumb.jpg
$echo $target
$cp -p $target $tmpfile
$convert $tmpfile +profile iptc +profile exif +profile xmp $target
$touch -r $tmpfile $target
done
$rm -f $tmpfile
exit
You are not authorized to post a reply.
Forums > EMu Development > Multimedia > MM thumbnails and reports: resolution issues



ActiveForums 3.6