@@ -231,7 +231,7 @@ std::shared_ptr<QImage> Frame::GetWaveform(int width, int height, int Red, int G
231231 }
232232
233233 // Create blank image
234- wave_image = std::shared_ptr<QImage>(new QImage (total_width, total_height, QImage::Format_ARGB32_Premultiplied ));
234+ wave_image = std::shared_ptr<QImage>(new QImage (total_width, total_height, QImage::Format_RGBA8888_Premultiplied ));
235235 wave_image->fill (QColor (0 ,0 ,0 ,0 ));
236236
237237 // Load QPainter with wave_image device
@@ -262,7 +262,7 @@ std::shared_ptr<QImage> Frame::GetWaveform(int width, int height, int Red, int G
262262 else
263263 {
264264 // No audio samples present
265- wave_image = std::shared_ptr<QImage>(new QImage (width, height, QImage::Format_ARGB32_Premultiplied ));
265+ wave_image = std::shared_ptr<QImage>(new QImage (width, height, QImage::Format_RGBA8888_Premultiplied ));
266266 wave_image->fill (QColor (QString::fromStdString (" #000000" )));
267267 }
268268
@@ -618,7 +618,7 @@ void Frame::Thumbnail(std::string path, int new_width, int new_height, std::stri
618618 std::string background_color, bool ignore_aspect, std::string format, int quality, float rotate) {
619619
620620 // Create blank thumbnail image & fill background color
621- std::shared_ptr<QImage> thumbnail = std::shared_ptr<QImage>(new QImage (new_width, new_height, QImage::Format_ARGB32_Premultiplied ));
621+ std::shared_ptr<QImage> thumbnail = std::shared_ptr<QImage>(new QImage (new_width, new_height, QImage::Format_RGBA8888_Premultiplied ));
622622 thumbnail->fill (QColor (QString::fromStdString (background_color)));
623623
624624 // Create painter
@@ -673,7 +673,7 @@ void Frame::Thumbnail(std::string path, int new_width, int new_height, std::stri
673673 overlay->load (QString::fromStdString (overlay_path));
674674
675675 // Set pixel format
676- overlay = std::shared_ptr<QImage>(new QImage (overlay->convertToFormat (QImage::Format_ARGB32_Premultiplied )));
676+ overlay = std::shared_ptr<QImage>(new QImage (overlay->convertToFormat (QImage::Format_RGBA8888_Premultiplied )));
677677
678678 // Resize to fit
679679 overlay = std::shared_ptr<QImage>(new QImage (overlay->scaled (new_width, new_height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)));
@@ -691,7 +691,7 @@ void Frame::Thumbnail(std::string path, int new_width, int new_height, std::stri
691691 mask->load (QString::fromStdString (mask_path));
692692
693693 // Set pixel format
694- mask = std::shared_ptr<QImage>(new QImage (mask->convertToFormat (QImage::Format_ARGB32_Premultiplied )));
694+ mask = std::shared_ptr<QImage>(new QImage (mask->convertToFormat (QImage::Format_RGBA8888_Premultiplied )));
695695
696696 // Resize to fit
697697 mask = std::shared_ptr<QImage>(new QImage (mask->scaled (new_width, new_height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)));
@@ -747,7 +747,7 @@ void Frame::AddColor(int new_width, int new_height, std::string new_color)
747747 const GenericScopedLock<juce::CriticalSection> lock (addingImageSection);
748748 #pragma omp critical (AddImage)
749749 {
750- image = std::shared_ptr<QImage>(new QImage (new_width, new_height, QImage::Format_ARGB32_Premultiplied ));
750+ image = std::shared_ptr<QImage>(new QImage (new_width, new_height, QImage::Format_RGBA8888_Premultiplied ));
751751
752752 // Fill with solid color
753753 image->fill (QColor (QString::fromStdString (color)));
@@ -775,8 +775,8 @@ void Frame::AddImage(int new_width, int new_height, int bytes_per_pixel, QImage:
775775 image = std::shared_ptr<QImage>(new QImage (qbuffer, new_width, new_height, new_width * bytes_per_pixel, type, (QImageCleanupFunction) &openshot::Frame::cleanUpBuffer, (void *) qbuffer));
776776
777777 // Always convert to RGBA8888 (if different)
778- if (image->format () != QImage::Format_ARGB32_Premultiplied )
779- *image = image->convertToFormat (QImage::Format_ARGB32_Premultiplied );
778+ if (image->format () != QImage::Format_RGBA8888_Premultiplied )
779+ *image = image->convertToFormat (QImage::Format_RGBA8888_Premultiplied );
780780
781781 // Update height and width
782782 width = image->width ();
@@ -798,9 +798,9 @@ void Frame::AddImage(std::shared_ptr<QImage> new_image)
798798 {
799799 image = new_image;
800800
801- // Always convert to Format_ARGB32_Premultiplied (if different)
802- if (image->format () != QImage::Format_ARGB32_Premultiplied )
803- *image = image->convertToFormat (QImage::Format_ARGB32_Premultiplied );
801+ // Always convert to Format_RGBA8888_Premultiplied (if different)
802+ if (image->format () != QImage::Format_RGBA8888_Premultiplied )
803+ *image = image->convertToFormat (QImage::Format_RGBA8888_Premultiplied );
804804
805805 // Update height and width
806806 width = image->width ();
@@ -830,8 +830,8 @@ void Frame::AddImage(std::shared_ptr<QImage> new_image, bool only_odd_lines)
830830 if (image == new_image || image->size () != new_image->size ()) {
831831 ret = true ;
832832 }
833- else if (new_image->format () != QImage::Format_ARGB32_Premultiplied ) {
834- new_image = std::shared_ptr<QImage>(new QImage (new_image->convertToFormat (QImage::Format_ARGB32_Premultiplied )));
833+ else if (new_image->format () != QImage::Format_RGBA8888_Premultiplied ) {
834+ new_image = std::shared_ptr<QImage>(new QImage (new_image->convertToFormat (QImage::Format_RGBA8888_Premultiplied )));
835835 }
836836 }
837837 if (ret) {
@@ -970,7 +970,7 @@ void Frame::AddMagickImage(std::shared_ptr<Magick::Image> new_image)
970970 MagickCore::ExportImagePixels (new_image->constImage (), 0 , 0 , new_image->columns (), new_image->rows (), " RGBA" , Magick::CharPixel, buffer, &exception);
971971
972972 // Create QImage of frame data
973- image = std::shared_ptr<QImage>(new QImage (qbuffer, width, height, width * BPP, QImage::Format_ARGB32_Premultiplied , (QImageCleanupFunction) &cleanUpBuffer, (void *) qbuffer));
973+ image = std::shared_ptr<QImage>(new QImage (qbuffer, width, height, width * BPP, QImage::Format_RGBA8888_Premultiplied , (QImageCleanupFunction) &cleanUpBuffer, (void *) qbuffer));
974974
975975 // Update height and width
976976 width = image->width ();
0 commit comments