Index: src/add-ons/translators/ico/ICO.h
===================================================================
--- src/add-ons/translators/ico/ICO.h	(Revision 35117)
+++ src/add-ons/translators/ico/ICO.h	(Arbeitskopie)
@@ -83,7 +83,7 @@
 	}
 };
 
-
+extern bool is_valid_size(int32 size);
 extern status_t identify(BMessage *settings, BPositionIO &stream, uint8 &type, int32 &bitsPerPixel);
 extern status_t convert_ico_to_bits(BMessage *settings, BPositionIO &source, BPositionIO &target);
 extern status_t convert_bits_to_ico(BMessage *settings, BPositionIO &source,
Index: src/add-ons/translators/ico/ICOTranslator.cpp
===================================================================
--- src/add-ons/translators/ico/ICOTranslator.cpp	(Revision 35117)
+++ src/add-ons/translators/ico/ICOTranslator.cpp	(Arbeitskopie)
@@ -156,6 +156,15 @@
 }
 
 
+status_t
+ICOTranslator::DerivedCanHandleImageSize(float width, float height) const
+{
+	if (!ICO::is_valid_size(width) || !ICO::is_valid_size(height))
+		return B_NO_TRANSLATOR;
+	return B_OK;
+}
+
+
 BView *
 ICOTranslator::NewConfigView(TranslatorSettings *settings)
 {
Index: src/add-ons/translators/ico/ICOTranslator.h
===================================================================
--- src/add-ons/translators/ico/ICOTranslator.h	(Revision 35117)
+++ src/add-ons/translators/ico/ICOTranslator.h	(Arbeitskopie)
@@ -44,6 +44,9 @@
 			const translator_info *inInfo, BMessage *ioExtension,
 			uint32 outType, BPositionIO *outDestination, int32 baseType);
 
+		virtual status_t DerivedCanHandleImageSize(float width,
+			float height) const;
+
 		virtual BView *NewConfigView(TranslatorSettings *settings);	
 
 	protected:
Index: src/add-ons/translators/ico/ICO.cpp
===================================================================
--- src/add-ons/translators/ico/ICO.cpp	(Revision 35117)
+++ src/add-ons/translators/ico/ICO.cpp	(Arbeitskopie)
@@ -166,13 +166,6 @@
 }
 
 
-static bool
-is_valid_size(int32 size)
-{
-	return size == 16 || size == 32 || size == 48;
-}
-
-
 static uint8
 get_alpha_value(color_space space, uint32 value)
 {
@@ -495,6 +488,13 @@
 //	#pragma mark -
 
 
+bool
+ICO::is_valid_size(int32 size)
+{
+	return size == 16 || size == 32 || size == 48;
+}
+
+
 status_t
 ICO::identify(BMessage *settings, BPositionIO &stream, uint8 &type, int32 &bitsPerPixel)
 {
Index: src/add-ons/translators/shared/BaseTranslator.cpp
===================================================================
--- src/add-ons/translators/shared/BaseTranslator.cpp	(Revision 35117)
+++ src/add-ons/translators/shared/BaseTranslator.cpp	(Arbeitskopie)
@@ -383,8 +383,7 @@
 	memcpy(&sourceMagic, ch, sizeof(uint32));
 	if (sourceMagic == kBitsMagic)
 		return B_OK;
-	else
-		return B_OK + 1;
+	return B_OK + 1;
 }
 
 status_t
@@ -392,17 +391,19 @@
 	const translation_format *inFormat, BMessage *ioExtension,
 	translator_info *outInfo, uint32 outType)
 {
-	status_t result;
-
-	result = BitsCheck(inSource, ioExtension, outType);
-	if (result == B_OK)
-		result = identify_bits_header(inSource, outInfo);
-	else if (result == B_OK + 1)
+	status_t result = BitsCheck(inSource, ioExtension, outType);
+	if (result == B_OK) {
+		TranslatorBitmap bitmap;
+		result = identify_bits_header(inSource, outInfo, &bitmap);
+		if (result == B_OK)
+			result = DerivedCanHandleImageSize(bitmap.bounds.Width() + 1.0,
+				bitmap.bounds.Height() + 1.0);
+	} else if (result >= B_OK) {
 		// if NOT B_TRANSLATOR_BITMAP, it could be an image in the
 		// derived format
 		result = DerivedIdentify(inSource, inFormat, ioExtension,
 			outInfo, outType);
-		
+	}
 	return result;
 }
 
@@ -452,7 +453,7 @@
 		case B_TRANSLATOR_BITMAP:
 			return BitsIdentify(inSource, inFormat, ioExtension,
 				outInfo, outType);
-			
+
 		default:
 			return DerivedIdentify(inSource, inFormat, ioExtension,
 				outInfo, outType);
@@ -595,7 +596,7 @@
 		case B_TRANSLATOR_BITMAP:
 			return BitsTranslate(inSource, inInfo, ioExtension, outType,
 				outDestination);
-				
+
 		default:
 			return DerivedTranslate(inSource, inInfo, ioExtension, outType,
 				outDestination, -1);
@@ -677,6 +678,13 @@
 }
 
 
+status_t
+BaseTranslator::DerivedCanHandleImageSize(float width, float height) const
+{
+	return B_OK;
+}
+
+
 BView *
 BaseTranslator::NewConfigView(TranslatorSettings *settings)
 {
Index: src/add-ons/translators/shared/BaseTranslator.h
===================================================================
--- src/add-ons/translators/shared/BaseTranslator.h	(Revision 35117)
+++ src/add-ons/translators/shared/BaseTranslator.h	(Arbeitskopie)
@@ -110,6 +110,8 @@
 		const translator_info *inInfo, BMessage *ioExtension,
 		uint32 outType, BPositionIO *outDestination, int32 baseType);
 		
+	virtual status_t DerivedCanHandleImageSize(float width, float height) const;
+
 	virtual BView *NewConfigView(TranslatorSettings *settings);
 	
 
