Changeset View
Changeset View
Standalone View
Standalone View
src/imageformats/rgb.cpp
Show First 20 Lines • Show All 703 Lines • ▼ Show 20 Line(s) | 703 | if (device->isSequential()) { | |||
---|---|---|---|---|---|
704 | while (readBytes > 0) { | 704 | while (readBytes > 0) { | ||
705 | device->ungetChar(head[readBytes-- - 1]); | 705 | device->ungetChar(head[readBytes-- - 1]); | ||
706 | } | 706 | } | ||
707 | 707 | | |||
708 | } else { | 708 | } else { | ||
709 | device->seek(oldPos); | 709 | device->seek(oldPos); | ||
710 | } | 710 | } | ||
711 | 711 | | |||
712 | return head.size() >= 4 && head.startsWith("\x01\xda\x01") && (head[3] == 1 || head[3] == 2); | 712 | return head.size() >= 4 && head.startsWith("\x01\xda") && (head[2] == 0 || head[2] == 1) && (head[3] == 1 || head[3] == 2); | ||
713 | } | 713 | } | ||
714 | 714 | | |||
715 | /////////////////////////////////////////////////////////////////////////////// | 715 | /////////////////////////////////////////////////////////////////////////////// | ||
716 | 716 | | |||
717 | QImageIOPlugin::Capabilities RGBPlugin::capabilities(QIODevice *device, const QByteArray &format) const | 717 | QImageIOPlugin::Capabilities RGBPlugin::capabilities(QIODevice *device, const QByteArray &format) const | ||
718 | { | 718 | { | ||
719 | if (format == "rgb" || format == "rgba" || | 719 | if (format == "rgb" || format == "rgba" || | ||
720 | format == "bw" || format == "sgi") { | 720 | format == "bw" || format == "sgi") { | ||
Show All 26 Lines |