equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
262 |
262 |
263 format = format.left(3); // ignore RAW part |
263 format = format.left(3); // ignore RAW part |
264 bool gray = format == "pgm"; |
264 bool gray = format == "pgm"; |
265 |
265 |
266 if (format == "pbm") { |
266 if (format == "pbm") { |
267 image = image.convertToFormat(QImage::Format_MonoLSB); |
267 image = image.convertToFormat(QImage::Format_Mono); |
268 } else if (image.depth() == 1) { |
268 } else if (image.depth() == 1) { |
269 image = image.convertToFormat(QImage::Format_Indexed8); |
269 image = image.convertToFormat(QImage::Format_Indexed8); |
270 } else { |
270 } else { |
271 switch (image.format()) { |
271 switch (image.format()) { |
272 case QImage::Format_RGB16: |
272 case QImage::Format_RGB16: |