How to load png image into data base


Hello all!

How I can to load image file to SciDB? I want to make some operations with them. Thank you a lot.


There’s no SciDB specific way to convert .png files to SciDB arrays.

Your best bet? Write code to convert the .png to a .csv format that looks (something) like this:


Then you can use the standard csv -> 1D load -> redimension_store(…) -> 2D array.

Hope this helps.


Here’s my $0.02’s worth.
Imagemagick suite’s “convert” command/app can make .ppm files, which are almost like a csv. Then you don’t even need to write a program, just
a simple awk or python script to make your csvs

e.g. a 640x480 (very old, old school) 24 bit image would look like this in ppm.
the first 255 is the “max” color value

640 480
255 0 0 123 123 211 …

etc, one triplet per pixel…
run the command convert image.png image.ppm and eyeball the ppm…



So, I make ppm-file, the image is colour. But I have some strange sequence with letters, numbers, and other characters. Is it normal? Or maybe I don’t understand you?
Or your way I can only for non colour image?


Make me a small, no bigger than 32x32 ppm file.
Put it up as a

in this forum.

I’ll show you ow to make a SciDB load file from it.

Cheers, George