libvips / nip2

A spreadsheet-like GUI for libvips.
https://libvips.github.io/libvips/
GNU General Public License v2.0
360 stars 13 forks source link

?: Saving/export histogram to similar image as its displayed by Nip2. #117

Closed MvGulik closed 7 months ago

MvGulik commented 7 months ago

Screenshot (2024-04-24 11:07:40)A Created this simple height-map scanning ws (yellow text not included). But ... its there a relative simple way to turn (or save) that histogram into an image as its displayed by nip2 ?

I figure I could use python+pillow to do that based on a csv from that histogram.

Ps: Using a somewhat older Nip2/Vips version.

jcupitt commented 7 months ago

Hello @MvGulik,

You can use hist_plot to draw an image from a histogram, eg.:

image

hist_norm will normalise a histogram, ie. make it "square".

You can also export a plot -- in a Plot window (B2 above), click File / Export Plot and you can save the nice plotted graph as a PNG.

MvGulik commented 7 months ago

Hi

Aha ... Got it converted. Thanks. Sorry. Have not looked in the Toolkits browser for a really long time.

"You can also export a plot -- in a Plot window (B2 above) ... "

That looks really nice. (Unfortunately that plot-image was not available in the build-version that I was using.)