@Andreas: could you please describe it in a bit more detail? I was able to
create CairoImageSurface, but not sure how it corresponds to
CairoPatterns() and drawing/resizing? (I'm pretty much to Cairo and
probably looking to a wrong documentation).


On Mon, Aug 4, 2014 at 12:47 PM, Andreas Lobinger <[email protected]>
wrote:

> Hello colleague,
>
> you can do everything Cairo internally without painting to screen
> (actually the part in Cairo that accesses Screen devices is the smaller
> one).
>
> So you can setup CairoImageSurfaces on data array (so something like
> d = [8,4; 2,1]
> d0 = reinterpret(Uint32,d);
> cs = CairoImageSurface(d0,Cairo.FORMAT_ARGB32);
> (written from remembering, i do not have julia available on this
> computer...)
> Then you find your data in cs.data. The same you can do with a target
> surface and you can use the cs Surface via CairoPattern(cs) as source to
> paint. And then scaling applies.
>
> When i'm back home, i can post an (working) example.
>
>
> Wishing a happy day,
>        Andreas
>
> On Sunday, August 3, 2014 11:24:07 PM UTC+2, Andrei Zh wrote:
>
>> @Andreas: As fas as I understand, Cairo only supports resizing when
>> displaying, while I was more interested in interpolating data matrices (I
>> use image as a source for machine learning algorithms and resizing as a way
>> to enlarge/reduce feature space). Please, let me know if there's a way to
>> extract interpolated data from Cairo surface.
>>
>>
>> On Sun, Aug 3, 2014 at 8:11 PM, Tim Holy <[email protected]> wrote:
>>
>>> Cairo is only used for ImageView.
>>>
>>> --Tim
>>>
>>> On Sunday, August 03, 2014 08:26:11 AM Andreas Lobinger wrote:
>>> > Hello colleague,
>>> >
>>> > i might be wrong, but you are already using Cairo in Images. You could
>>> do
>>> > all the bitmap resizing/interpolation stuff by painting on a scaled
>>> > CairoSurface. This is even available in different interpolation schemes
>>> > http://www.cairographics.org/manual/cairo-cairo-pattern-t.
>>> html#cairo-filter-> t
>>> >
>>> > Wishing a happy day,
>>> >       Andreas
>>>
>>>
>>

Reply via email to