diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2022-11-10 17:01:09 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2022-11-14 15:45:35 +0200 |
commit | 81eb6599391bd02e90af312fd1ffd8f859d92f1f (patch) | |
tree | 107ac54337f675d7faba59a4f0dd7fbef6ad2f3e /plugin-img.c | |
parent | ee14af5bf4e8b85ea4a45be697e233b3d456e5bf (diff) | |
download | gimp-plugin-img-81eb6599391bd02e90af312fd1ffd8f859d92f1f.tar.gz |
Replace deprecated in Gimp 2.10 functions
Gimp 2.10 is required now.
Diffstat (limited to 'plugin-img.c')
-rw-r--r-- | plugin-img.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/plugin-img.c b/plugin-img.c index b4b19d7..d89ab6a 100644 --- a/plugin-img.c +++ b/plugin-img.c @@ -11,10 +11,12 @@ img_set_parasite (gint32 image, const ImageParasite * p) D (("Setting parasite for %u: format: %s (%1u), " "color key: %s (%1u, %1u, %1u)\n", image, FMT[p->format], p->format, (p->ckey.is) ? "yes" : "no", p->ckey.R, p->ckey.G, p->ckey.B)); - gimp_image_parasite_detach (image, PARASITE_ORIG_FILE); - gimp_image_attach_new_parasite (image, PARASITE_ORIG_FILE, - GIMP_PARASITE_PERSISTENT, - sizeof (ImageParasite), p); + gimp_image_detach_parasite (image, PARASITE_ORIG_FILE); + + const GimpParasite *gp = + gimp_parasite_new (PARASITE_ORIG_FILE, GIMP_PARASITE_PERSISTENT, + sizeof (*p), p); + gimp_image_attach_parasite (image, gp); } static void @@ -22,12 +24,12 @@ img_get_parasite (gint32 image, ImageParasite * p) { GimpParasite *gp = NULL; - gp = gimp_image_parasite_find (image, PARASITE_ORIG_FILE); + gp = gimp_image_get_parasite (image, PARASITE_ORIG_FILE); if (gp != NULL) { p->format = ((ImageParasite *) (gp->data))->format; p->ckey = ((ImageParasite *) (gp->data))->ckey; - D (("Setting parasite for %u: format: %s (%1u), " + D (("Getting parasite for %u: format: %s (%1u), " "color key: %s (%1u, %1u, %1u)\n", image, FMT[p->format], p->format, (p->ckey.is) ? "yes" : "no", p->ckey.R, p->ckey.G, p->ckey.B)); @@ -92,10 +94,10 @@ run (const gchar * name, gint nparams, const GimpParam * param, GimpRunMode run_mode; GimpPDBStatusType status = GIMP_PDB_SUCCESS; GimpExportReturn export = GIMP_EXPORT_CANCEL; - GError *error = NULL; run_mode = param[0].data.d_int32; + gegl_init (NULL, NULL); *nreturn_vals = 1; *return_vals = values; |