API Question on Getting Perfered Size

undertoe
undertoe's picture

Joined: 2008-01-31
Posts: 32
Posted: Mon, 2008-02-18 20:07

I am completely stumped.

I am writing a theme and I have some scripts to kick back some xml responses for Ajax items.
All I am trying to do is get the a copy of the small image shown on this page:

http://colt45.chemlab.org/photos/main.php?g2_itemId=2498

I have used the fetchPreferredsByItemIds function but that does not always seem to give me the right image size.

example:
list ($ret, $preferred) = GalleryCoreApi::fetchPreferredsByItemIds( array( $child->getId() ) );

I want it so this page:
http://colt45.chemlab.org/photos/main.php?g2_itemId=2490

shows a 640x480 picture above the cover flow when an image is selected. Right now it shows the full size image.

This is driving me crazy, any help would be greatly appreciated.