summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Add new direct2d platform pluginLouai Al-Khanji2014-01-101-1/+2
| | | | | | | | | This is an alternative plugin for the windows platform. It shares most code with the current windows plugin, but substitutes a direct2d-based paint engine for window backing stores and pixmaps. Change-Id: I78fafd9c5871fa090b49436f5b40ec80f8789f8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Avoid unnecessary double conversion over ARGB32 and ARGB32PMAllan Sandfeld Jensen2014-01-103-59/+52
| | | | | | | | | | | | | | | Currently if the converter_map does not have an entry for how to do a direct conversion, the image is first converted to ARGB32 and then to the final format. In most cases the conversion to ARGB32 is the generic converter which convert over ARGB32PM, which mean the data is converted to ARGB32PM then to ARGB32, then to ARBG32PM and then to final format. This patch uses the generic converter directly everywhere there isn't an optimized converter declared and it is valid. Change-Id: Ibad57432ef8c58025e63a032b09f92dad4a559ee Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Clean up qimage.cpp by moving all the conversions methods outAllan Sandfeld Jensen2014-01-104-2114/+2167
| | | | | | | | | | A large part of qimage.cpp is the implementation of the various conversions methods from one format to another. These methods could all be moved to a separate file to make qimage.cpp smaller, and possible later enable more aggressive optimization on the conversions. Change-Id: I355806710281b4222114cdd9c35a7c28cbc0f692 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Inplace versions of QImage rgbSwapped() and mirrored() for rvalue refsAllan Sandfeld Jensen2014-01-084-110/+308
| | | | | | | | | Adds inplace version of QImage::rgbSwapped() and QImage::mirrored() that can be used on temporary QImage objects when supported by the compiler. [ChangeLog][QtGui][QImage]Rvalue qualified mirrored and rgbSwapped methods for inline conversions Change-Id: I4ffb658bf620dfc472d9db14c1aa70291c1fd842 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fixes: 32 bit and alpha bmp format image readingaavit2014-01-081-46/+61
| | | | | | | | | | | | | | | | | The bmp handler would ignore the high byte of a 32bit bmp. It would also ignore any alpha channel. The actual change is really simple; it just adds the alpha_* members and the reading of the 4th byte in 32bit depth. However, detection of alpha channel required switching the order of two independent blocks of code, hence the size of this patch. [ChangeLog][QtGui] Support reading bmp images with alpha channel Task-number: QTBUG-35220 Change-Id: Ib133c3644c03c5cfc728f5fa2c837219804e69ae Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-032-2/+2
|\ | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * Fix some typos in documentation.Jeff Tranter2014-01-022-2/+2
| | | | | | | | | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2e946fda0bd9a2117f8e9b2fb300df9bf0a98a6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | RValue ref version of QPixmap::fromImage()Allan Sandfeld Jensen2014-01-025-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | When converting from a temporary image we can use inplace conversion since we don't have to worry about changes made to the original. This should give a speedup in several places where QPixmaps are made from the return values of methods returning QImages. Change-Id: I1835bcf3fc061c4dbbb3d0507ec84178dc49b29b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QImageReader: simplify _qt_BuiltInFormatsMarc Mutz2013-12-251-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By construction of the _qt_BuiltInFormatType enum, the .type in _qt_BuiltInFormats exactly equals its position. So there's no need to store it explicitly. Effects on Linux AMD64 GCC 4.9-trunk release stripped: text: -16B data: -64B relocs: +-0 (of course) Change-Id: Ib68c32de42d264f27bbd8a863538dd78b1ba4507 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-242-10/+7
|\| | | | | | | Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
| * Use #pragma warning(push) and pop to control our warningsThiago Macieira2013-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | Using "default" means "reset to default compiler settings", not "revert to command-line settings". And even if it did, it's possible some other headers by the user toggled the settings. We shouldn't affect that. Task-number: QTBUG-35622 Change-Id: If7c4bd0cc8c210f88ee89e3fa2dd3b7194ad77bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix strings in QImageWriter.ABBAPOH2013-12-161-9/+5
| | | | | | | | | | | | Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-162-16/+39
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * Check if device is opened before trying to create image handler.ABBAPOH2013-12-121-14/+35
| | | | | | | | | | | | Change-Id: I60f1f6890fdd73e489da4aab9928370163f55f58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
| * Simplify linking to different jpeg libs.Mitch Curtis2013-12-091-2/+4
| | | | | | | | | | | | | | | | | | | | This makes it slightly more obvious which compiler should be used with which. Task-number: QTBUG-23119 Change-Id: Ie3e5cf995d686bfa846902a040668716c8b5f526 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Remove the files building AVX codeThiago Macieira2013-12-104-78/+1
|/ | | | | | | | | | | | | | | This feature was never completely implemented. Sure, it's nice to build the SSE2 + SSSE3 code with the VEX prefix, which results in better code. But the leap isn't that big anyway. This is the first step to removing the runtime detection for the drawhelpers. They create timebombs when we use inline functions. Task-number: QTBUG-30440 Change-Id: Ic53b2cf5261106a1c940d4a36eb6111b7d998be1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Missing entry in QImage inplace_converter_mapAllan Sandfeld Jensen2013-11-151-0/+3
| | | | | | | | | The inplace_converter_map never had an entry for ARGB4444_Premultiplied this leads to the possibility of accessing outside of the array, and means the RGBA8888 formats are misplaced. Change-Id: Ida0d94912b53a7730b8fb5f6ccc31e7879ea3d27 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Improve documentation of QImageIOPluginAlex Merry2013-11-051-13/+27
| | | | | | | | | | Expanded the documentation to describe what the code in QImageReader and QImageWriter actually expects from these plugins. Change-Id: I04bb0cbf56d57a56ed246e723e533d73440a4d3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Make error messages a bit better.Stephen Kelly2013-11-051-1/+1
| | | | | | Change-Id: I83b5852abfbb3437c03516bc4b36eff385ddb983 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Assert in QImage conversion from rgba8888pm -> rgba8888Allan Sandfeld Jensen2013-10-311-1/+1
| | | | | | | Fix typo in assert. Change-Id: I7dc056957b31a869eabe2e45feb99ae4fccb2d97 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QImageWriter: add a forgotten #ifndef QT_NO_IMAGEFORMAT_BPMMarc Mutz2013-10-251-0/+2
| | | | | | | The equivalent code in qimagereader.cpp has this, so add here, too. Change-Id: I0313727f009db5cb00ee9ce0540ba2674da49ccd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-0811-94/+94
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-274-0/+41
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.Sérgio Martins2013-09-251-0/+5
| | | | | | | See QTBUG-33473 for more information about this compiler bug. Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix truncation and conversion warnings on MSVC2010.Mitch Curtis2013-09-251-2/+2
| | | | | Change-Id: I44845e13b97753333a7c80a80ead0b352b8906b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove some qBinaryFind usages from QtGuiGiuseppe D'Angelo2013-09-231-2/+4
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I9cbb1790f94e7726e127b9ad1bd5a58c433055a8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove a Borland-related inclusionGiuseppe D'Angelo2013-09-231-5/+0
| | | | | | | There are no calls to qSort in the file any more. Change-Id: Ifd65b543941ab90d6a1ed4e318d925bdbf3f454e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-211-7/+17
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-211-7/+17
| |\ | | | | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| | * PNG: properly handle 1bpp greyscale images with alphaGiuseppe D'Angelo2013-09-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PNG allows 1bpp greyscale images (PNG_COLOR_TYPE_GRAY) to have an alpha key; so even in this case we need to inquiry if the image has a transparency, and if so modify the color table of the monochrome image accordingly. Task-number: QTBUG-33503 Change-Id: Iab07c8f95ac8865269c48816e222645cdcb6bbc1 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
| | * Add missing initialization before requesting png data for scaled readSamuel Gaist2013-09-181-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize all values read to sensible default in case reading them fails in read_image_scaled. It has already been done for a normal image read Task-number: QTBUG-32674 Change-Id: I19dccad7ef342f1b1bba6b513c04d3661d128a54 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | | Fix some doc errors.Frederik Gladhorn2013-09-214-4/+4
|/ / | | | | | | | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | WinRT: Basic global supportAndrew Knight2013-09-201-1/+1
| | | | | | | | | | | | | | | | Various global changes, primarily preprocessor flow, to support the WinRT platform. Change-Id: I3fa9cf91d5fb24019362e88fcf205e31b4f810b5 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-09-131-23/+6
|\| | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| * Compilation fix for libjpeg release 9aavit2013-09-111-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | In the latest libjpeg version, the "boolean" type is changed so that true and false no longer can be used instead of TRUE and FALSE. Also, purge some ancient code remains meant to support a now defunct OS´s idea about the boolean type. Task-number: QTBUG-33166 Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-8/+8
|\| | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Initialize variables to fix valgrind warning in pnghandler.Friedemann Kleint2013-08-301-8/+8
| | | | | | | | | | | | | | | | | | Conditional jump or move depends on uninitialised value(s) ==7986== at 0x5B838E8: QPngHandlerPrivate::readPngImage(QImage*) (qpnghandler.cpp:617) Change-Id: Ie739ca1665ce600426e2816a6229145d814125cb Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | Remove deprecated QtAlgorithms calls from QtGuiGiuseppe D'Angelo2013-09-053-5/+11
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I324ddf6129fe8884ecea97ef47abb7c071dfb34c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | qimagereader: fix build on iOSRichard Moe Gustavsen2013-09-051-1/+1
| | | | | | | | | | Change-Id: Ia928e449ecec49988e0af69da0a7aded5bf36871 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Fix qt_pixmapToWinHICON() not to return invalid HICON for null pixmapsJ-P Nurmi2013-09-041-0/+3
| | | | | | | | | | | | Change-Id: Ieda923bf27514a3daa8a5de7836511ab32346260 Reviewed-by: Ivan Vizir <define-true-false@yandex.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-1/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Add offset reading support in pnghandlerSamuel Gaist2013-08-071-1/+17
| | | | | | | | | | | | | | | | | | This patch adds the offset reading that matches the offset writing in writeImage Task-number: QTBUG-32674 Change-Id: I264ba41163e59638d7219e0a8913f9d455830883 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | Support RGBA image formatAllan Sandfeld Jensen2013-07-236-34/+669
| | | | | | | | | | | | | | | | | | Support the byte-ordered RGBA format which is used by OpenGL, and many endian neutral byte formats. Task-number: QTBUG-32201 Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-112-3/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * QIcon: Avoid fetching twice the same pixmapGabriel de Dietrich2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | Looks like something went through the reviewer's eyes. This commit amends 6ec9b34cbb5fa6b1214cc6551002f46f732ba72f. Change-Id: I59a05361b1cbdf4e5177821d958766ffe3218f16 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Fix build when QIMAGEREADER_DEBUG is enabled in qimagereader.cppKeonil Jeong2013-07-011-2/+2
| | | | | | | | | | | | | | | | | | If QIMAGEREADER_DEBUG is enabled in qimagereader.cpp, the build fails. There are wrong variables in qimagereader.cpp:314,395 Change-Id: I22498c49fbfecb3799dc5cabf374486bb715ded7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-204-14/+14
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * Remove use of 'register' from Qt.Stephen Kelly2013-06-174-14/+14
| | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-11/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62