r25003 by craig - Resurrect initialize() in case preloadAlphaChannel is not called on a

scribus-commit scribus-commit at lists.scribus.net
Wed Mar 9 20:41:23 UTC 2022


Author: craig
Date: Wed Mar  9 20:41:23 2022
New Revision: 25003

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25003
Log:
Resurrect initialize() in case preloadAlphaChannel is not called on a
new image

Modified:
    trunk/Scribus/scribus/scimage.cpp
    trunk/Scribus/scribus/scimage.h

Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25003&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp	(original)
+++ trunk/Scribus/scribus/scimage.cpp	Wed Mar  9 20:41:23 2022
@@ -83,6 +83,33 @@
 QImage ScImage::scaled(int w, int h, Qt::AspectRatioMode mode, Qt::TransformationMode transformMode) const
 {
 	return QImage::scaled(w, h, mode, transformMode);
+}
+
+void ScImage::initialize()
+{
+	imgInfo.xres = 72;
+	imgInfo.yres = 72;
+	imgInfo.colorspace = ColorSpaceRGB;
+	imgInfo.valid = false;
+	imgInfo.isRequest = false;
+	imgInfo.isEmbedded = false;
+	imgInfo.progressive = false;
+	imgInfo.exifDataValid = false;
+	imgInfo.lowResType = 1;
+	imgInfo.lowResScale = 1.0;
+	imgInfo.PDSpathData.clear();
+	imgInfo.RequestProps.clear();
+	imgInfo.clipPath.clear();
+	imgInfo.usedPath.clear();
+	imgInfo.profileName.clear();
+	imgInfo.embeddedProfileName.clear();
+	imgInfo.layerInfo.clear();
+	imgInfo.duotoneColors.clear();
+	imgInfo.exifInfo.cameraName.clear();
+	imgInfo.exifInfo.cameraVendor.clear();
+	imgInfo.exifInfo.thumbnail = QImage();
+	imgInfo.BBoxX = 0;
+	imgInfo.BBoxH = 0;
 }
 
 ScImage::~ScImage()

Modified: trunk/Scribus/scribus/scimage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25003&path=/trunk/Scribus/scribus/scimage.h
==============================================================================
--- trunk/Scribus/scribus/scimage.h	(original)
+++ trunk/Scribus/scribus/scimage.h	Wed Mar  9 20:41:23 2022
@@ -50,6 +50,8 @@
 		OutputProfile = 3,
 		Thumbnail = 4,
 	};
+
+	void initialize();
 
 	const QImage& qImage();
 	QImage* qImagePtr();




More information about the scribus-commit mailing list