Re: [Gegl-developer] npy saving operation



Though I understand the implication, but as there are currently no readers that can deal with larger than RAM npy images, I suggest keeping the whole buffer approach for the first commit.

Thanks!
Dov

Øyvind Kolås <pippin gimp org> wrote:

On Tue, May 28, 2013 at 5:27 PM, Dov Grobgeld <dov grobgeld gmail com> wrote:
> I finished a saver operation for floating point npy images. It may e.g. be
> used to debug floating point operations (e.g. gaussian-blur) with numerical
> python. The resulting image may be read into numpy as follows:
>
>    import numpy
>    img = numpy.load('image.npy')
>
> It may also be viewed in my image viewer giv (though it currently does not
> support color npy images).
>
> Is it ok to commit it?

It would be good to avoid fetching the whole buffer with gegl_buffer_get; GeglBuffer can store larger than RAM images and a malloc this large might fail. It would be better to use a loop either over scanlines of the image or groups of scanlines (32 or 64 at a time).

/Øyvind K.
--
«The future is already here. It's just not very evenly distributed»
                                                 -- William Gibson
http://pippin.gimp.org/                            http://ffii.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]