summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.h
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate all methods that use QMatrixJarek Kobus2020-01-281-0/+4
| | | | | | | | | | | Don't use QMatrix in implementation classes anymore. Task-number: QTBUG-46653 Fixes: QTBUG-81627 Change-Id: I4806c1302e42645dc6a608062c8d9c336ae8629b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modernize setAlphaChannel(), and deprecated alphaChannel()Allan Sandfeld Jensen2020-01-051-1/+3
| | | | | | | | | | | | The two methods have been marked obsolete for a very long time, setAlphaChannel() is still convenient though, so this patch modernizes it and removes obsolete from the API, while marking QImage::alphaChannel() as deprecated. They don't work as getter and setter anyway, since setAlphaChannel() actually does an alpha composition. Change-Id: I634d6463f78c42bb9c5fa3df17500ec01bfcac33 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Introduce QImage::Format_BGR888Allan Sandfeld Jensen2019-08-231-0/+1
| | | | | | | | | Is pretty common on some architectures so we can avoid swizzling by supporting it. Fixes: QTBUG-45671 Change-Id: Ic7a21b5bfb374bf7496fd2b2b1252c2f1ed47705 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-011-4/+0
| | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace qMove with std::moveAllan Sandfeld Jensen2019-04-061-2/+2
| | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-051-7/+7
| | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-03-261-0/+4
|\ | | | | | | Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-201-0/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| | * Avoid creating wide images with negative bytesPerLineAllan Sandfeld Jensen2019-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QImage API can not handle images with more bytes per line than what an integer can hold. Fixes: QTBUG-73731 Fixes: QTBUG-73732 Change-Id: Ieed6fec7645661fd58d8d25335f806faaa1bb3e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Long live QColorSpace and friendsAllan Sandfeld Jensen2019-02-081-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds QColorSpace and QColorTransform classes, and parsing of a common subset of ICC profiles found in images, and also parses the ICC profiles in PNG and JPEGs. For backwards compatibility no automatic color handling is done by this patch. [ChangeLog][QtGui] A QColorSpace class has been added, and color spaces are now parsed from PNG and JPEG images. No automatic color space conversion is done however, and applications must request it. Change-Id: Ic09935f84640a716467fa3a9ed1e73c02daf3675 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Introduce QImage::convertToMikhail Svetkin2019-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | QImage::convertTo can be used to change the format of an image in place. [ChangeLog][QtGui][QImage] A new method convertTo is has been added to change the format of a QImage in place. Change-Id: Ib31379085c4b97e56c3cb569f144062bcd3fdc20 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Add Grayscale16 Image FormatAllan Sandfeld Jensen2018-12-121-3/+0
|/ | | | | | | | | | [ChangeLog][QtGui][QImage] Added support for 16-bit grayscale format. Together-with: Aaron Linville<aaron@linville.org> Task-number: QTBUG-41176 Change-Id: I5fe4f54a55ebe1413aa71b882c19627fe22362ac Reviewed-by: Nick D'Ademo <nickdademo@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix spelling mistake in qimage.hTor Arne Vestbø2018-09-131-1/+1
| | | | | | Change-Id: I2138318894587cc0b5f03af14a57b2a39509f0da Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Implement support for 16bpc image formatsAllan Sandfeld Jensen2018-08-111-0/+3
| | | | | | | | | | | | | | Adds support for 16bit per color image formats in QImage. This makes it possible to read and write 16bpc PNGs, and take full advantage of the 16bpc paint engine. [ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with 16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats. Task-number: QTBUG-45858 Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QImage: Add Q_GADGET and make format enumeration a Q_ENUMFriedemann Kleint2018-04-061-0/+2
| | | | | | | This makes debugging easier. Change-Id: I023fc1220b2a33db85bb8388bcfea433eb810f63 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.10.0' into 5.10Liang Qi2017-12-081-1/+1
| |\ | | | | | | | | | Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
| | * Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * | QImage: Add the replacement function to byteCount's deprecation msgThiago Macieira2017-11-221-1/+1
| |/ | | | | | | | | Change-Id: I938b024e38bf4aac9154fffd14f903e22b364c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-3/+3
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix deprecation warningsAllan Sandfeld Jensen2017-07-111-1/+1
| | | | | | | Switch to QImage::sizeInBytes for huge QImage support. Change-Id: I0145f204dd2db6670e199c320fff9064b4a97ef4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-1/+4
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move Q_REQUIRED_RESULT to its correct positionThiago Macieira2017-04-201-4/+4
| | | | | | | | | | | That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Introduce QImage::reinterpretAsFormatAllan Sandfeld Jensen2017-01-181-0/+1
| | | | | | | | | | | | | QImage::reinterpretAsFormat can be used to change the format of an image without converting the data, to correct wrong formats or narrow the format to an opaque one if found to be opaque. [ChangeLog][QtGui][QImage] A new method reinterpretAsFormat is has been added to change the format of a QImage without converting the data. Change-Id: I5e15bc5a1c474a35d3921b06299008ab2effd945 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add a macros for disabling deprecated declaration warningsThiago Macieira2016-11-271-2/+1
| | | | | | | | | This is the only warning we disable in a lot of places in Qt 5.8 source code. If other warnings become common, we can add macros for them too. Change-Id: Iaeecaffe26af4535b416fffd1489d1968e29c52a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Darwin: Add QImage::toCGImage() conversion functionMorten Johan Sørvig2016-08-111-0/+9
| | | | | | | | | | | | | | | | | | | (Move QT_FORWARD_DECLARE_CG to qglobal.h) This function converts to CGImage for supported formats. This is done by creating a CGImageRef that reuses the QImage data. The CGImage and QImage ref counting systems are bridged, implemented by using CGDataProvider that holds a copy of the QImage. Unlike the previous internal implementation this public version does not implicitly convert unsupported formats to ARGB32_Premultiplied. See included documentation for the complete description. Change-Id: Ie3984a7a8331e02a6f1c42943caaf76854e93538 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| * Fixed developer build for MinGWOliver Wolff2016-06-151-1/+1
| | | | | | | | | | | | | | 0 must not be used as a null pointer constant Change-Id: I082d0e99c105fb02980b9cf390e7f6e4c9ad0869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... or similar. This amends previous commits that converted the majority of cases. Task-number: QTBUG-45291 Change-Id: I219cdeddca7063a56efeb4fee0e5bb2cbdc7732b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Mark ref-qualified members as always inlineThiago Macieira2015-10-071-2/+2
|/ | | | | | | | | | | | | MSVC and ICC on Windows always make calls to the dllexport'ed out-of- line copy of an inline function when compiling in debug mode. This creates an incompatibility when a compiler that understands ref- qualified member functions (such as ICC) is used to compile code using a DLL that was compiled with a compiler that doesn't understand (such as MSVC 2013). Task-number: QTBUG-48349 Change-Id: I42e7ef1a481840699a8dffff14053b7998a2a6bb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtGui: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-191-12/+12
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I72ab40b21a9499b53a639564fa45884de17b6c98 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * Add noexcept to move constructors and assignment operatorsAllan Sandfeld Jensen2015-05-041-4/+5
| | | | | | | | | | | | | | | | | | Add the noexcept attribute to all move constructors and assignment operators in QtGui that didn't already have it. Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-05-041-0/+1
|\| | | | | | | Change-Id: I487a4b7c05687a10c498ac219c31367d4db6fbc0
| * Preserve QImage metadata in image transformsAllan Sandfeld Jensen2015-04-281-0/+1
| | | | | | | | | | | | | | | | | | Some QImage methods were not preserving image metadata, or only preserving some of it. This adds the missing parts and adds a test for metadata. Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix RGB30 painting testsAllan Sandfeld Jensen2015-04-131-2/+11
|/ | | | | | | | | | | | | | Some tests were failing because the color was not read correctly from a QImage. To make it possibly to read more accurate colors a pixel accessor returing QColor has been added. Some tests also had the wrong order of arguments, confusing dest and src formats. This has been corrected, so they test what they claim to test. A test for RGB30 linear gradients is also added. Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-131-1/+5
| | | | | | | | | | | Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Use the new warning enabling/disabling macros in qtbaseThiago Macieira2014-12-031-12/+4
| | | | | | Change-Id: I91ff06644e8047c2ca483f9768b46c1372eb6171 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-3/+3
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-19/+11
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Add Grayscale8 and Alpha8 formats to QImage and drawingAllan Sandfeld Jensen2014-09-171-10/+6
|/ | | | | | | | | | | | Extend the QImage format with two 8-bit grayscale and alpha formats. These formats have the advantage over Indexed8 that they have simpler conversion and can be rendered to by the raster engine. [ChangeLog][QtGui][QImage] Added support grayscale and alpha 8-bit formats which can also be rendered to. Change-Id: I4343c80a92a3dda196aa38d0c3ea251b094fc274 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QImage: add a qMove()Marc Mutz2014-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The color table is passed by value (good for C++11), so when the argument is assigned to the member variable, that's a good spot for a move assignment. However, the argument is also declared const. The standard says that top-level const is ignored, but some compilers (I know about SunCC) think differently, so we cannot remove it. Instead, we do a const_cast. It is well-defined: Even though apparently the argument was declared as const, the standard says the const is not there, and no sane compiler would put the argument copy into read-only memory. Add a reminder to remove the top-level const from the signature come Qt 6. Change-Id: Iac18846ba669de0a30da620685ad1438c267e193 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPixelFormat is better taken by-valueMarc Mutz2014-08-091-1/+1
| | | | | | | 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>