File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -330,11 +330,25 @@ This creates a new metadata item of the specified type, name and value.
330330
331331This changes the value of an existing field, but will not change its type.
332332
333+ You can't use ` set() ` to change core fields such as like ` width ` or
334+ ` interpretation ` . Use ` copy() ` instead.`
335+
336+ Image references will be shared by the operation cache, so modifying an image
337+ can change an image somewhere else in your program. Before changing an image,
338+ you must make sure you own a private copy of an image with ` copy ` .
339+
340+ ``` lua
341+ local new_image = image :copy ()`
342+ new_image :set (" orientation" , 7 )
343+ ```
344+
333345### ` boolean = vips.Image.remove(image, field_name) `
334346
335347This will remove a piece of metadata. It returns ` true ` if an item was
336348successfully removed, ` false ` otherwise.
337349
350+ As with ` set ` , you must use copy before removing a metadata item.
351+
338352## Call any libvips operation
339353
340354You can call any libvips operation as a member function, for example
You can’t perform that action at this time.
0 commit comments