summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* QPixelFormat is better taken by-valueMarc Mutz2014-08-092-2/+2
| | | | | | | Being a better quint64, it can be passed in registers, so take them as value args. Change-Id: I8eb96a2594d910b538b651fb3ca567c0c124dd3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Add missing #include <qdatastream.h> or <qiodevice.h>Thiago Macieira2014-08-072-0/+2
| | | | | | | Lots of code depended on an indirect includes from qstringlist.h. Change-Id: I33d0dce33d64302d6c0e49180cc1249b90ab27c5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make sure that QPixelFormat is constexprThiago Macieira2014-08-061-1/+1
| | | | | | | by declaring the array of formats constexpr too. Change-Id: I5c8e23ef9dc0fcac9c246f48dbee24c390d4583c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add SubType setters/getters and SupportedSubTypes option.Ivan Komissarov2014-08-056-1/+87
| | | | | | | | SubType can be used to determine an internal format of an image such as pixel format and/or compression algorithms. Change-Id: Icf296d54bb509e4e2bdb70544df678fc53f57c79 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Ensure valid data after QImage::invertPixelsAllan Sandfeld Jensen2014-07-311-3/+47
| | | | | | | | | | | | | | | | QImage::invertPixels may produce invalid data after inversions of images with premultiplied alpha, because the inverted colors will be larger than the alpha. This patch converts any image with a premultiplied alpha channel to ARGB32 before inverting the pixels, and then back to the original format after the inversion. Support is added for correct inversion of RGBA8888 and RGB30 formats. Task-number: QTBUG-39901 Change-Id: Ief24c55f495e67ef2ad6429b5b418d02963a64dd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-0/+1
|\ | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| * QPixmap::fromImage() should detach when changing QImage formatAllan Sandfeld Jensen2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When QPixmap::fromImage() detects an ARGB32 image with only opaque pixels it will do a conversion where it only changes the advertised format of the image. This conversion was lacking a check to see if it the QImage was shared before doing so, which this patch adds. Task-number: QTBUG-40282 Change-Id: I3acf221b76735637cef04c2104a33f87e5f09d54 Reviewed-by: Andreas Löw <andreas@code-and-web.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Rewrite simd.prf to share more codeThiago Macieira2014-07-251-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a long-time coming. One innovation from this commit is that it will add the source to SOURCES if the compiler is already generating code for that specific target. That is currently always the case for Neon, and the MIPS DSPs since that is the only condition in which configure will enable those targets. And because of qt_module.prf, it's also always the case for SSE2 (but not for SSE3 or higher). So simplify the .pri files by removing always-true conditions. Change-Id: Ib24af74717b652c9a6be246e3c17a839470f37da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Restore Neon "detection" in QtThiago Macieira2014-07-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually detect whether the compiler can create Neon code or provides Neon intrinsics. Most of them do, so that test would be mostly moot. We removed the detection previously because we couldn't automatically enable Neon due to leakage of instructions outside the areas protected at runtime. Instead, we rely on the mkspec properly passing the necessary flags that enable Neon support. This commit does not change that. All it does is verify whether the arch detection found "neon" as part of the target CPU features. In other words, it moves the test that was in simd.prf to configure. It does fix the Neon detection in configure.exe, which was always failing for trying to run a test that didn't exist (config.tests/unix/neon). Change-Id: Id561dfb2db7d3dca7b8c29afef63181693bdc0aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Keep global state of debug stream (QImage, QPixmap, and QIcon)Kai Koehne2014-07-233-24/+30
| | | | | | | | | | | | | | Make sure that the stream's formatting settings are preserved. Change-Id: Ib13b5e0b36b2ef801da2d2d5c240d28dc1b04653 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Improve debug output of QImage, QPixmap and QIcon.Friedemann Kleint2014-07-213-3/+33
| | | | | | | | | | | | Task-number: QTBUG-38858 Change-Id: Ie45d595478f971c7ed973d911c65484d947d2a60 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Rename QPixelFormat enum value to avoid conflict with X.h.Axel Rasmussen2014-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | This commit fixes a potential compile error where pixelformat.h would not compile if X.h from x11proto was included first, since X.h #define's GrayScale as an integer constant. Task-number: QTBUG-40087 Change-Id: I7208a204259c6d3a13b5d0cbc98a76bb54b8b494 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-102-3/+5
|\| | | | | | | Change-Id: Ia12ffdb27ecdf25c2a2bdb0eed1945387502108a
| * Add opt-out environment variable for @2x imagesMorten Johan Sørvig2014-07-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where @2x images are in use but where you don't want the associated behavior: - You are implementing an image editor - You are inheriting a resource set which has @2x images, but don't want that behavior with Qt. Add support for disabling @2x behavior with QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING. Change-Id: I206e050b6241f8935b4404c7a28b024a9e00d46c Task-id: QTBUG-38485 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QImage support for RGB30 formatsAllan Sandfeld Jensen2014-07-047-36/+735
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds basic support for 10-bit per color channel formats to QImage and the XCB plugin. This will make it possible to paint to and from these formats, but only at 8-bit per color channel accuracy. This also fixes Qt5 applications on X11 with native 30bit depth. [ChangeLog][QtGui][QImage] Added support for 10-bit per color channel image formats. Task-number: QTBUG-25998 Change-Id: I93ccd3c74bfbb0bd94b352476e5fe58a94119e1f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-016-178/+234
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * GIF decoding: do not seek() if the image is loaded over the networkShawn Rutledge2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | This suppresses the warning QIODevice::seek: Cannot call seek on a sequential device Task-number: QTBUG-39217 Change-Id: Ie7b0845c760ae6fc857d02bf9ec5c5adb24fb631 Reviewed-by: aavit <eirik.aavitsland@digia.com>
| * Simplify mirroring code and add tests for non-aliged 1 bit imagesLaszlo Agocs2014-06-231-113/+97
| | | | | | | | | | Change-Id: I309714bc52de87c702194a4a82803d383f6ac3b3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * QIcon: Prefer high-quality images of Windows .ico files.Friedemann Kleint2014-06-222-36/+93
| | | | | | | | | | | | | | | | | | | | | | Refactor the code QPixmapIconEngine::addFile() using a convenience class for reading all images. Special-case .ico-files: Read images into a list and replace by higher-quality ones. Task-number: QTBUG-39287 Change-Id: I32ab6c77a276dc5d4d9a8f7b216c81149b8772b8 Reviewed-by: aavit <eirik.aavitsland@digia.com>
| * Correct QImage::fill(uint) on RGBA8888 formatsAllan Sandfeld Jensen2014-06-201-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::fill(uint) was incorrectly performing ARGB->RGBA conversion when called on RGBA8888 formated images. This patch moves the color conversion to QImage::fill(QColor) where it belongs so that fill(uint) can behave consistent with documentation and how it treats other formats. The fill(uint) method had no automated tests, and this patch adds one. [ChangeLog][QtGui][QImage] QImage::fill(uint) now fills the given pixel value unconverted when used on RGBA8888 image, making it consistent with the documentation and treatment of all other image formats. Change-Id: I00a9d810c61d350dbdd7c4b9ad09e5ce11896b6d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * QRasterPlatformPixmap::createPixmapForImage(): Avoid crash when QImage ↵Martin Pley2014-06-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | conversion failes Added some checks to QRasterPlatformPixmap::createPixmapForImage() to avoid crashes when QImage::convertToFormat() returns a null image. Change-Id: I573505a1aff7931d9a2fb452d0a83ae93d8de7db Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Add missing detach() in QPixmap::convertFromImage()David Faure2014-06-111-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-18519 Change-Id: I5d929cf6eda3f34130314edac95487fb00a95db5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | MIPS: Support recognition of the DSP ASE at run-timeAdrian Perez de Castro2014-06-272-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it possible to have generic Qt builds for MIPS that can enable the fast code paths for processors with the DSP ASE at run-time. Also, this makes it possible to manually disable them by setting the environment variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions requiring DSPr2 are not enabled when running in CPUs with version-1 DSP. Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix inconsistent export in QPixmapIconEngineAndrew Knight2014-06-261-2/+2
| | | | | | | | | | | | | | | | Removes "warning C4273: 'operator <<' : inconsistent dll linkage" under MSVC2013. Change-Id: I463441802a76f02db329631947232c70a85ae9e7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-74/+86
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * Windows: Fix qt_imageFromWinHBITMAP().Friedemann Kleint2014-05-231-74/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | Factor out common code paths from the QPixmap/QImage conversion code and use the same algorithm for copying the image data with alpha correction as does qt_pixmapFromWinHBITMAP(). Rename the previous version of qt_imageFromWinHBITMAP() to qt_imageFromWinIconHBITMAP() since it is used for HICON conversion. Task-number: QTBUG-39084 Change-Id: Ia4042c33db485c3604461a5eafd6282968b36e3b Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-1/+3
|\| | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| * [blitter] Initialize m_devicePixelRatio to fix crashLucile Quirion2014-05-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using directfb platform the drawing of some widgets (e.g. Toolbar) would crash the application. Pixmap device pixel ratio can be used in QCommonStyle::drawControl() as a denominator to calculate pixmap width or size. The drawing of some widgets (e.g. Toolbar) would fail the assertion of a non-zero denominator. This commit initializes the device pixel ratio when generating BlitterClass pixmaps and makes QBlittablePlatformPixmap::metric( PdmDevicePixelRatio) return devicePixelRatio() instead of 1. Task-number: QTBUG-38709 Change-Id: Ia8b96c5341b5ac1297c483deed1c695846398b88 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-061-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Don't crash on broken GIF imagesLars Knoll2014-04-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Broken GIF images could set invalid width and height values inside the image, leading to Qt creating a null QImage for it. In that case we need to abort decoding the image and return an error. Initial patch by Rich Moore. Task-number: QTBUG-38367 Change-Id: Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e Security-advisory: CVE-2014-0190 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Fixed i18n in QImageReader/QImageWriter.Ivan Komissarov2014-04-284-10/+14
| | | | | | | | | | | | Change-Id: I366831e23e4d29999696872d752b9487d1f22d44 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Introducing QPixelFormatJorgen Lind2014-04-232-0/+274
| | | | | | | | | | | | | | | | | | Its purpose in life will be to describe pixel formats [ChangeLog][QtGui] Added QPixelFormat class Change-Id: I74d8f974606520efb3935110ff3d6ddb5ea805a8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Serialize QPicture using the latest QDataStream version.Mitch Curtis2014-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QDataStream version with which QPicture was previously serialized with was hard-coded to 11 (Qt 4.5). This prevents features of serializable types used by QPicture from being serialized if they were added after Qt 4.5; namely features of QFont like HintingPreference. [ChangeLog][QtGui][QPicture] QPicture now serializes its data properly by also accounting for QDataStream versions greater than Qt 4.5. Task-number: QTBUG-20578 Change-Id: Idd27682b187f4d4a3695c52bbf68e84853c024a8 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devIikka Eklund2014-04-012-1/+3
|\| | | | | | | Change-Id: I2a6eb9dd7724931bc89f28bcc156e77c4e26d069
| * If no screens, attempting to create a window results in clean exitShawn Rutledge2014-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | Asserting is only relevant for debug builds, and there were a couple of other places that a segfault would typically occur before the assert had a chance. Change-Id: I1abc82eb3ecfa91050117fab1525f4cbd82ff486 Task-number: QTBUG-37876 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix some documentation errors.Friedemann Kleint2014-03-241-1/+1
| | | | | | | | | | | | | | | | Correct links and fix typos, remove obsolete documentation, fix some snippets, mark some classes as internal. Change-Id: I9a3266605f060783413d32740057a57a820c8929 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Mitch Curtis2014-03-311-1/+0
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-241-1/+0
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| | * AVX image code was removedFrederik Gladhorn2014-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove a last left-over after 5e519b31dceff1fbb0a7ac5eeb5f6e071c1b6ef7 Change-Id: I85e73a5d81d45b4ccfc80cdaf34ab7b6c3c85bdc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QImageReader/Writer: replace dubious use of QSet<QByteArray> with QListMarc Mutz2014-03-262-35/+23
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code populated QSets with some strings and went on to copy the values to QLists. Since QSet is unordered_set, those lists were not sorted, so the code did that manually. Since QSet is a node-based container and not even an ordered one, the code pays a hefty price just for ensuring uniqueness of values prior to sorting. The new code just crams everything into lists, duplicates and all, then sorts the lists and only then removes duplicates using std::unique. Saves 3376B in text size on Linux AMD64 GCC 4.9-trunk release stripped QtGui. Change-Id: Ifee931102c01b7505c712cebf4effc37e94165b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* / MIPS: Fast path for rgb888 to rgb32 conversionAdrian Perez de Castro2014-03-064-1/+121
|/ | | | | | | | | | Add a hand-coded MIPS assembler function to convert a stream of rgb888 bytes to an array of 32-bit ARGB values. This is used in QImage for image conversion, and also in QJpegHandler for decoding JPEG image scanlines. Change-Id: Ia74a5ff799b29fad3d4acbfcafe790cd60586d72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * Fix assert when converting RGBx8888 to ARGB32_PMAllan Sandfeld Jensen2014-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | RGBx8888 to ARGB32_PM is incorrectly using the RGBA8888 to ARGB32_PM which asserts the input format is RGBA8888. Since the routine also performs an unnecessy premul, we should be using a the generic rgba2argb routine. Change-Id: I7b67328f804f5f2a9664a35c04836679e8c8b8e5 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-113-31/+34
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-073-31/+34
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| | * Doc: Fix broken linksSze Howe Koh2014-02-041-2/+0
| | | | | | | | | | | | | | | Change-Id: Ic275dfbf0b332fc34ea0fac1c31c4935ad961527 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Load all available pixmaps in an icon file.Bastiaan Veelo2014-01-301-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the problem that only the first icon would be read from an .ico file with muliple icons of various sizes in it. Task-number: QTBUG-28267 Change-Id: I50daa89769054234e9ffc5246f59b46975948871 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * Do not overwrite basePixmap of QIconLoader PixmapEntryAlbert Astals Cid2014-01-221-3/+4
| | | | | | | | | | | | | | | | | | Change-Id: I4799af1d9151ba4b0952369e9620d2fab2b002d9 Reviewed-by: David Sansome <me@davidsansome.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | | Export optimized premultiply and unpremultiply methodsAllan Sandfeld Jensen2014-02-105-20/+20
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch optimizes the unpremultiply method further by using a lookup table to avoid any divisions at all. The opportunity is taken to export both premultiply and unpremultiply since they are commonly used methods relevant to the exported QRgb type that can be both premultiplied and unpremultipled ARGB. [ChangeLog][QtGui][QColor] Exported highly optimized methods for premultiply and unpremultiply of QRgb values. Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Ensure QImage::pixel() on RGB32 images returns valid QRgb valuesAllan Sandfeld Jensen2014-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently QImage::pixel() returns the raw underlying pixel values for RGB32. For all other pixel formats the returned value is either valid ARGB32 or ARGB32PM. This patch masks the undefined alpha field in RGB32 so that the return value is well defined QRgb. It also fixes one test that relied on the previous behavior. Change-Id: If37463528268b7419733499d1f7bfd0d1097d21e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>