API2 no width or height for rendition?

Hello,

I would like to pull the width and height for additional renditions added to an item. But it’s returning a value of zero for renditions.

API DETIALS:
API=asset.cfc
method=getrenditions
assettype=img

API CODE SHOWS:
rendition’ AS type,
av_id id,
0 AS width,
0 AS height,

Is there no way to pull the width and height? The correct width and height display okay in the UI.

Also, I’m wondering what the “Rendition For Web” field is for in the rendition metadata. I couldn’t find any documentation on it.

Thanks!

I just tested this and the width and height returns properly. Also I don’t
see a “renditions for web” field.

Are you sure you are using API2 and not API only? Also, what version of
Razuna are you using with which database?

Thank you for the response, Nitai. We are using Razuna 1.7 with the H2 database, and definitely using API2. It appears to only be an issue for renditions that have been added via upload (as in ID # 9CA60… in the screenshot below.

I’m wanting to use the “Use as Preview Image” option to identify the preferred rendition to appear in various Web applications. I’m comparing the aspect ratio of the Thumbnail with the aspect ration of the original and any renditions to pull what matches the “Preview Image” (“thumb”).

Is there a better way to pull a specific rendition without explicitly defining it by ID in another application? Or, is there a DB field value for the “Use as Preview Image” that I can query in the API to go about it that way instead?

Since the thumbnails are by default 400pxx400px, they usually serve as
preview images. In the JSON data you can see them marked as “thumb”.

Renditions can have their own metadata, so you could theoretically add your
own value to renditions and then parse the renditions according to this
value in order to pull the right rendition into your app. Something along
those lines.

All available API calls are published at
http://wiki.razuna.com/display/ecp/API+Developer+Guide

Hope this helps.

I wasn’t aware that custom fields carried over to renditions. This will work perfectly. Thank you!