From c7e44b0531ac5067cbc60fd1d29238b4d1c3e6ba Mon Sep 17 00:00:00 2001
From: Freeman Lou <freemanlou2430@Yahoo.com>
Date: Mon, 23 Dec 2013 02:15:04 +0000
Subject: [PATCH] ico translator identify
---
src/add-ons/translators/ico/ICOTranslator.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/add-ons/translators/ico/ICOTranslator.cpp b/src/add-ons/translators/ico/ICOTranslator.cpp
index b38de1d..544c2ea 100644
a
|
b
|
ICOTranslator::DerivedIdentify(BPositionIO *stream,
|
103 | 103 | const translation_format *format, BMessage *ioExtension, |
104 | 104 | translator_info *info, uint32 outType) |
105 | 105 | { |
| 106 | TranslatorBitmap bitsHeader; |
| 107 | status_t status = identify_bits_header(stream, NULL, &bitsHeader); |
| 108 | if (status != B_OK) |
| 109 | return status; |
| 110 | |
| 111 | float width = bitsHeader.bounds.Width() + 1.0; |
| 112 | float height = bitsHeader.bounds.Height() + 1.0; |
| 113 | if (DerivedCanHandleImageSize(width, height) != B_OK) |
| 114 | return B_BAD_VALUE; |
| 115 | |
106 | 116 | if (!outType) |
107 | 117 | outType = B_TRANSLATOR_BITMAP; |
108 | 118 | if (outType != B_TRANSLATOR_BITMAP && outType != ICO_IMAGE_FORMAT) |