0

We need to open an image and write its pixels to memory, so a C library can further process it. We're doing this with the lines below:

image = Vips::Image.new_from_file(filename)
pixels_pointer = image.write_to_memory

However, it seems that what's written in memory differs per environment. We're testing this on a macOS High Sierra and on an Ubuntu Xenial via Docker, with vips-8.8.0 and ruby-vips (2.0.13). We've MD5-ed the result of writing to memory:

p Digest::MD5.hexdigest(pixels_pointer)

and here are the outcomes for both:

  • macOS High Sierra: 141e9b6a84f4ca05a7699b33fc0ef808
  • Ubuntu Xenial via Docker: 019a568e40dcc41ac6496da06d29d723

I have no clue why this is happening and where shall I look further. Any tip would be highly appreciated!

linkyndy
  • 17,038
  • 20
  • 114
  • 194
  • Please don't ask the same question at the same time in many places. It makes unnecessary work for volunteers who are trying to support free software. Duplicate of https://github.com/libvips/ruby-vips/issues/195 – jcupitt May 27 '19 at 13:47
  • I had not known where would people offer help regarding this – linkyndy May 27 '19 at 15:33

0 Answers0