--- librawstudio/rs-exif.cc
+++ librawstudio/rs-exif.cc	2026-01-25 07:09:46.000000000 +0800
@@ -128,7 +128,7 @@
 	RS_EXIF_DATA *exif_data;
 	try
 	{
-		Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+		Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
 		assert(image.get() != 0);
 		image->readMetadata();
 
@@ -136,7 +136,7 @@
 
 		exif_data_init(exif_data);
 	}
-	catch (Exiv2::AnyError& e)
+	catch (Exiv2::Error& e)
 	{
 		g_warning("Could not load EXIF data from file %s", filename);
 		return NULL;
@@ -151,7 +151,7 @@
 	RS_EXIF_DATA *rs_exif_data;
 	try
 	{
-		Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(
+		Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(
 			(const Exiv2::byte*) raw_get_map(rawfile), raw_get_filesize(rawfile));
 
 		assert(image.get() != 0);
@@ -161,7 +161,7 @@
 
 		exif_data_init(rs_exif_data);
 	}
-	catch (Exiv2::AnyError& e)
+	catch (Exiv2::Error& e)
 	{
 		g_warning("Could not load EXIF data");
 		return NULL;
@@ -179,7 +179,7 @@
 	try
 	{
 		Exiv2::ExifData *data = (Exiv2::ExifData *) d;
-		Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+		Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
 
 		/* Copy EXIF to XMP */
 #if EXIV2_TEST_VERSION(0,17,0)
@@ -200,7 +200,7 @@
 		image->setIptcData(iptc_data);
 		image->writeMetadata();
 	}
-	catch (Exiv2::AnyError& e)
+	catch (Exiv2::Error& e)
 	{
 		g_warning("Couldn't add EXIF data to %s", filename);
 	}
@@ -269,7 +269,7 @@
 
 	glong items_written;
 	gunichar2 *w = g_utf8_to_utf16(xpkeyw->str, -1, NULL, &items_written, NULL);
-	Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::unsignedByte);
+	Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::unsignedByte);
 	v->read((const Exiv2::byte*)w, items_written * sizeof(gunichar2), Exiv2::invalidByteOrder);
 	Exiv2::ExifKey key = Exiv2::ExifKey("Exif.Image.XPKeywords");
 	data->add(key, v.get());

--- plugins/load-gdk/exiv2-colorspace.cpp
+++ plugins/load-gdk/exiv2-colorspace.cpp	2026-01-25 07:51:41.000000000 +0800
@@ -155,7 +155,7 @@
 #endif
 
 	try {
-		Image::AutoPtr img = ImageFactory::open(filename);
+		Image::UniquePtr img = ImageFactory::open(filename);
 		img->readMetadata();
 		ExifData &exifData = img->exifData();
 		*gamma_guess = 2.2f;
@@ -173,13 +173,13 @@
 			ExifData::const_iterator i;
 			i = exifData.findKey(ExifKey("Exif.Image.BitsPerSample"));
 			if (i != exifData.end())
-				if (i->toLong() == 16)
+				if (i->toInt64() == 16)
 					*gamma_guess = 1.0f;
 			
 			i = exifData.findKey(ExifKey("Exif.Photo.ColorSpace"));
 			if (i != exifData.end())
 			{
-				if (i->toLong() == 1)
+				if (i->toInt64() == 1)
 					return rs_color_space_new_singleton("RSSrgb");
 			}
 
@@ -188,10 +188,10 @@
 			if (i != exifData.end())
 			{
 				DataBuf buf(i->size());
-				i->copy(buf.pData_, Exiv2::invalidByteOrder);
-				if (buf.pData_ && buf.size_)
+				i->copy(buf.data(), Exiv2::invalidByteOrder);
+				if (buf.data() && buf.size())
 				{
-					RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)buf.pData_, buf.size_, TRUE);
+					RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)buf.data(), buf.size(), TRUE);
 					return rs_color_space_icc_new_from_icc(icc);
 				}
 			}

--- plugins/load-png/exiv2-colorspace.cpp
+++ plugins/load-png/exiv2-colorspace.cpp	2026-01-25 07:59:05.000000000 +0800
@@ -155,7 +155,7 @@
 #endif
 
 	try {
-		Image::AutoPtr img = ImageFactory::open(filename);
+		Image::UniquePtr img = ImageFactory::open(filename);
 		img->readMetadata();
 		ExifData &exifData = img->exifData();
 		*gamma_guess = 2.2f;
@@ -173,13 +173,13 @@
 			ExifData::const_iterator i;
 			i = exifData.findKey(ExifKey("Exif.Image.BitsPerSample"));
 			if (i != exifData.end())
-				if (i->toLong() == 16)
+				if (i->toInt64() == 16)
 					*gamma_guess = 1.0f;
 			
 			i = exifData.findKey(ExifKey("Exif.Photo.ColorSpace"));
 			if (i != exifData.end())
 			{
-				if (i->toLong() == 1)
+				if (i->toInt64() == 1)
 					return rs_color_space_new_singleton("RSSrgb");
 			}
 
@@ -188,10 +188,10 @@
 			if (i != exifData.end())
 			{
 				DataBuf buf(i->size());
-				i->copy(buf.pData_, Exiv2::invalidByteOrder);
-				if (buf.pData_ && buf.size_)
+				i->copy(buf.data(), Exiv2::invalidByteOrder);
+				if (buf.data() && buf.size())
 				{
-					RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)buf.pData_, buf.size_, TRUE);
+					RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)buf.data(), buf.size(), TRUE);
 					return rs_color_space_icc_new_from_icc(icc);
 				}
 			}

--- plugins/meta-exiv2/exiv2-metadata.cpp
+++ plugins/meta-exiv2/exiv2-metadata.cpp	2026-01-25 08:08:46.000000000 +0800
@@ -93,7 +93,7 @@
 exiv2_load_meta_interface(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta)
 {
 	try {
-		Image::AutoPtr img = ImageFactory::open((byte*)raw_get_map(rawfile), raw_get_filesize(rawfile));
+		Image::UniquePtr img = ImageFactory::open((byte*)raw_get_map(rawfile), raw_get_filesize(rawfile));
 		img->readMetadata();
 		ExifData &exifData = img->exifData();
 
@@ -120,10 +120,10 @@
 			i = orientation(exifData);
 			if (i != exifData.end())
 			{
-				std::auto_ptr<Exiv2::Value> val = i->getValue();
+				std::unique_ptr<Exiv2::Value> val = i->getValue();
 				if (val->count())
 				{
-					switch (val->toLong())
+					switch (val->toInt64())
 					{
 							case 6: meta->orientation = 90;
 								break;
@@ -176,7 +176,7 @@
 #if EXIV2_TEST_VERSION(0,19,0)
 			i = isoSpeed(exifData);
 			if (i != exifData.end())
-				meta->iso = i->toLong();
+				meta->iso = i->toInt64();
 
 			/* Text based Lens Identifier */
 			i = lensName(exifData);
@@ -184,7 +184,7 @@
 			{
 				TypeId type = i->typeId();
 				if (type == unsignedShort || type == unsignedLong || type == signedShort || type == signedLong || type == unsignedByte || type == signedByte)
-					meta->lens_id = i->toLong();
+					meta->lens_id = i->toInt64();
 				else if (type == asciiString || type == string)
 					meta->fixed_lens_identifier = g_strdup(i->toString().c_str());
 			}
@@ -226,7 +226,7 @@
 			if (i == exifData.end())
 				i = exifData.findKey(ExifKey("Exif.NikonLd3.MinFocalLength"));
 			if (i != exifData.end())
-				meta->lens_min_focal = 5.0 * pow(2.0, i->toLong()/24.0);
+				meta->lens_min_focal = 5.0 * pow(2.0, i->toInt64()/24.0);
 
 			i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxFocalLength"));
 			if (i == exifData.end())
@@ -234,7 +234,7 @@
 			if (i == exifData.end())
 				i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxFocalLength"));
 			if (i != exifData.end())
-				meta->lens_max_focal = 5.0 * pow(2.0, i->toLong()/24.0);
+				meta->lens_max_focal = 5.0 * pow(2.0, i->toInt64()/24.0);
 
 			i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMinFocal"));
 			if (i == exifData.end())
@@ -242,7 +242,7 @@
 			if (i == exifData.end())
 				i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMinFocal"));
 			if (i != exifData.end())
-				meta->lens_min_aperture = i->toLong()/12.0;
+				meta->lens_min_aperture = i->toInt64()/12.0;
 			
 			i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMaxFocal"));
 			if (i == exifData.end())
@@ -250,7 +250,7 @@
 			if (i == exifData.end())
 				i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMaxFocal"));
 			if (i != exifData.end())
-				meta->lens_max_aperture = i->toLong()/12.0;
+				meta->lens_max_aperture = i->toInt64()/12.0;
 				
 			/* Fuji */
 			i = exifData.findKey(ExifKey("Exif.Fujifilm.MinFocalLength"));
