Re: [greenstone-users] ImagePlug bug?

From Michael Dewsnip
DateWed, 30 Jul 2003 14:47:14 +1200
Subject Re: [greenstone-users] ImagePlug bug?
In-Reply-To (AFAC9B2BF1A8BF4886F5C0FDE428E90E0791EA17-edumail2-education-tas-gov-au)
Hi Ben,

Quite right, this is a problem. It is due to the fact that if the "convert"
program doesn't have anything to do (eg. it is asked to resize an image to
the size it already is, which is what is happening here), its output is
slightly different. When ImagePlug was written, this case wasn't noticed
and no allowance is made for parsing the subtly different output.

The easiest solution is to add four lines of code to, just
after this code (around line 275):

# get screenview dimensions, size and type
if ($result =~ m/[0-9]+x[0-9]+=>([0-9]+)x([0-9]+)/) {
$doc_obj->add_metadata ($section, "ScreenWidth", $1);
$doc_obj->add_metadata ($section, "ScreenHeight", $2);

The four lines to add are:

else {
$doc_obj->add_metadata ($section, "ScreenWidth", $image_width);

$doc_obj->add_metadata ($section, "ScreenHeight",

Hope this fixes your problem.



"Dwyer, Benjamin J" wrote:

> Hi,
> I'm having a problem with image plug, specifically when specifying
> screenviewsize.
> If for example I have an original image with the dimensions: 540 W x 760
> H, and I set the screenviewsize to be 760, when I view the collection in
> IE 6 the image is not displayed because both the width and height are
> not set. However if I were to set the viewscreensize to 761 everthing is
> fine.
> Can anyone help?
> Regards
> Ben Dwyer
> _______________________________________________
> greenstone-users mailing list