|
![](/i/fill.gif) |
> Alain<aze### [at] qwerty org> wrote:
>>> ..........................
>>> (I know there's one around
>>> somewhere, can't find it at the moment).
>>> ..........................
>
>>
>> From the documentations:
>>
>> As of version 3.7 experimental support for reading the pixel resolution
>> of an image map was added. This is done by giving an image map pigment
>> identifier to max_extent(), which will then return the resolution of the
>> image map as the x and y values of the returned vector.
>>
>> Sample code:
>> #declare Image =
>> pigment {
>> image_map {
>> jpeg "YourImage.jpg"
>> once
>> }
>> };
>>
>> #declare Resolution = max_extent ( Image );
>>
>> It return Resolution =<horizontal_size, vertical_size, 0>;
>>
>>
>>
>> Alain
>
> That was indeed it. *feels embarrassed* :(
>
> Thanks Alain, I didn't realise (not having actually used it ;) ) that
> max_extent() returned a vector. This makes things a little easier.
>
> Regards
> D103
>
>
>
>
max_extent() and min_extent() both return vectors. It's needed to define
the bouncing box of the object used as an argument.
In ordinary use, min_extent return the front or near, bottom left corner
of the bounding box and max_extent() return the back or far, top right
corner.
Post a reply to this message
|
![](/i/fill.gif) |