0

I am working on a C shared library that would contain one function that receives a filename, and returns a pointer to the C-array representation of the image.

I read VIPS_INIT needs to be set in the beginning of the program, with argv[0] as its argument. However, since this is a shared library, I'm not sure where exactly do I need to place this.

linkyndy
  • 17,038
  • 20
  • 114
  • 194

1 Answers1

1

libvips uses argv[0] to help discover message catalogues if its been relocated. If you don't need a relocatable package, you can just pass "" and it'll be fine.

Other notes: be careful not to init from more than one thread at the same time, and make sure init finishes before you try any processing.

jcupitt
  • 10,213
  • 2
  • 23
  • 39
  • I added a note to the docs for this. Thanks! https://github.com/libvips/libvips/commit/81861baee967380dd1e45fe863f57b1c960fcea8 – jcupitt May 30 '19 at 18:47