94a71a8cbbbae3e10b3d4a87b5ce44dc356701d0
[mono.git] / mcs / class / System.Drawing / Test / System.Drawing / TestImageConverter.cs
1 //
2 // Tests for System.Drawing.ImageConverter.cs 
3 //
4 // Authors:
5 //      Sanjay Gupta (gsanjay@novell.com)
6 //      Sebastien Pouliot  <sebastien@ximian.com>
7 //
8 // Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 // 
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 // 
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29
30
31 using NUnit.Framework;
32 using System;
33 using System.Drawing;
34 using System.Drawing.Imaging;
35 using System.Collections;
36 using System.ComponentModel;
37 using System.Globalization;
38 using System.IO;
39 using System.Security.Permissions;
40
41 namespace MonoTests.System.Drawing
42 {
43         [TestFixture]
44         [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
45         public class ImageConverterTest 
46         {
47                 Image image;            
48                 ImageConverter imgConv;
49                 ImageConverter imgConvFrmTD;
50                 String imageStr;
51                 byte [] imageBytes;
52
53                 [SetUp]
54                 public void SetUp ()            
55                 {
56                         image = Image.FromFile (TestBitmap.getInFile ("bitmaps/almogaver24bits.bmp"));
57                         imageStr = image.ToString ();
58                 
59                         imgConv = new ImageConverter();
60                         imgConvFrmTD = (ImageConverter) TypeDescriptor.GetConverter (image);
61                         
62                         Stream stream = new FileStream (TestBitmap.getInFile ("bitmaps/almogaver24bits1.bmp"), FileMode.Open);
63                         int length = (int) stream.Length;
64                         imageBytes = new byte [length];
65                         
66                         try {
67                                 if (stream.Read (imageBytes, 0, length) != length)
68                                         Assert.Fail ("SU#1: Read Failure"); 
69                         } catch (Exception e) {
70                                 Assert.Fail ("SU#2 Exception thrown while reading. Exception is: "+e.Message);
71                         } finally {
72                                 stream.Close ();
73                         }
74                 
75                         stream.Close ();
76
77                 }
78
79                 [Test]
80 #if TARGET_JVM
81                 [NUnit.Framework.Category ("NotWorking")]
82 #endif
83                 public void TestCanConvertFrom ()
84                 {
85                         Assert.IsTrue (imgConv.CanConvertFrom (typeof (byte [])), "CCF#1");
86                         Assert.IsTrue (imgConv.CanConvertFrom (null, typeof (byte [])), "CCF#1a");
87                         Assert.IsTrue (imgConv.CanConvertFrom (null, imageBytes.GetType ()), "CCF#1b");
88                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (String)), "CCF#2");
89                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3");
90                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Point)), "CCF#4");
91                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (PointF)), "CCF#5");
92                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Size)), "CCF#6");
93                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (SizeF)), "CCF#7");
94                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Object)), "CCF#8");
95                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (int)), "CCF#9");
96                         Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Metafile)), "CCF#10");
97
98                         Assert.IsTrue (imgConvFrmTD.CanConvertFrom (typeof (byte [])), "CCF#1A");
99                         Assert.IsTrue (imgConvFrmTD.CanConvertFrom (null, typeof (byte [])), "CCF#1aA");
100                         Assert.IsTrue (imgConvFrmTD.CanConvertFrom (null, imageBytes.GetType ()), "CCF#1bA");
101                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (String)), "CCF#2A");
102                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Rectangle)), "CCF#3A");
103                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Point)), "CCF#4A");
104                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (PointF)), "CCF#5A");
105                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Size)), "CCF#6A");
106                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (SizeF)), "CCF#7A");
107                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Object)), "CCF#8A");
108                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (int)), "CCF#9A");
109                         Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Metafile)), "CCF#10A");
110
111                 }
112
113                 [Test]
114 #if TARGET_JVM
115                 [NUnit.Framework.Category ("NotWorking")]
116 #endif
117                 public void TestCanConvertTo ()
118                 {
119                         Assert.IsTrue (imgConv.CanConvertTo (typeof (String)), "CCT#1");
120                         Assert.IsTrue (imgConv.CanConvertTo (null, typeof (String)), "CCT#1a");
121                         Assert.IsTrue (imgConv.CanConvertTo (null, imageStr.GetType ()), "CCT#1b");
122                         Assert.IsTrue (imgConv.CanConvertTo (typeof (byte [])), "CCT#2");
123                         Assert.IsTrue (imgConv.CanConvertTo (null, typeof (byte [])), "CCT#2a");
124                         Assert.IsTrue (imgConv.CanConvertTo (null, imageBytes.GetType ()), "CCT#2b");
125                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Rectangle)), "CCT#3");
126                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Point)), "CCT#4");
127                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (PointF)), "CCT#5");
128                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Size)), "CCT#6");
129                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (SizeF)), "CCT#7");
130                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Object)), "CCT#8");
131                         Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (int)), "CCT#9");
132
133                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (typeof (String)), "CCT#1A");
134                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, typeof (String)), "CCT#1aA");
135                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, imageStr.GetType ()), "CCT#1bA");
136                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (typeof (byte [])), "CCT#2A");
137                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, typeof (byte [])), "CCT#2aA");
138                         Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, imageBytes.GetType ()), "CCT#2bA");
139                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Rectangle)), "CCT#3A");
140                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Point)), "CCT#4A");
141                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (PointF)), "CCT#5A");
142                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Size)), "CCT#6A");
143                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (SizeF)), "CCT#7A");
144                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Object)), "CCT#8A");
145                         Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (int)), "CCT#9A");
146
147                 }
148
149                 [Test]
150 #if TARGET_JVM
151                 [NUnit.Framework.Category ("NotWorking")]
152 #endif
153                 public void ConvertFrom ()
154                 {
155                         Image newImage = (Image) imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, imageBytes);
156                         
157                         Assert.AreEqual (image.Height, newImage.Height, "CF#1");
158                         Assert.AreEqual (image.Width, newImage.Width, "CF#1a");
159
160                         Assert.AreEqual ("(none)", imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, null, typeof (string)), "Null/Empty");
161
162                         newImage = (Image) imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, imageBytes);
163
164                         Assert.AreEqual (image.Height, newImage.Height, "CF#1A");
165                         Assert.AreEqual (image.Width, newImage.Width, "CF#1aA");
166                 }
167                 
168                 [Test]
169 #if TARGET_JVM
170                 [NUnit.Framework.Category ("NotWorking")]
171 #endif
172                 [ExpectedException (typeof (NotSupportedException))]
173                 public void ConvertFrom_BadString ()
174                 {
175                         imgConv.ConvertFrom ("System.Drawing.String");
176                 }
177
178                 [Test]
179 #if TARGET_JVM
180                 [NUnit.Framework.Category ("NotWorking")]
181 #endif
182                 [ExpectedException (typeof (NotSupportedException))]
183                 public void ConvertFrom_BadString_WithCulture ()
184                 {
185                         imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, "System.Drawing.String");
186                 }
187
188                 [Test]
189 #if TARGET_JVM
190                 [NUnit.Framework.Category ("NotWorking")]
191 #endif
192                 [ExpectedException (typeof (NotSupportedException))]
193                 public void ConvertFrom_Bitmap ()
194                 {
195                         imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, new Bitmap (20, 20));
196                 }
197
198                 [Test]
199 #if TARGET_JVM
200                 [NUnit.Framework.Category ("NotWorking")]
201 #endif
202                 [ExpectedException (typeof (NotSupportedException))]
203                 public void ConvertFrom_Point ()
204                 {
205                         imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, new Point (10, 10));
206                 }
207
208                 [Test]
209 #if TARGET_JVM
210                 [NUnit.Framework.Category ("NotWorking")]
211 #endif
212                 [ExpectedException (typeof (NotSupportedException))]
213                 public void ConvertFrom_SizeF ()
214                 {
215                         imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, new SizeF (10, 10));
216                 }
217
218                 [Test]
219 #if TARGET_JVM
220                 [NUnit.Framework.Category ("NotWorking")]
221 #endif
222                 [ExpectedException (typeof (NotSupportedException))]
223                 public void ConvertFrom_Object ()
224                 {
225                         imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, new Object ());
226                 }
227
228                 [Test]
229 #if TARGET_JVM
230                 [NUnit.Framework.Category ("NotWorking")]
231 #endif
232                 [ExpectedException (typeof (NotSupportedException))]
233                 public void TypeDescriptor_ConvertFrom_BadString ()
234                 {
235                         imgConvFrmTD.ConvertFrom ("System.Drawing.String");
236                 }
237
238                 [Test]
239 #if TARGET_JVM
240                 [NUnit.Framework.Category ("NotWorking")]
241 #endif
242                 [ExpectedException (typeof (NotSupportedException))]
243                 public void TypeDescriptor_ConvertFrom_BadString_Culture ()
244                 {
245                         imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, "System.Drawing.String");
246                 }
247
248                 [Test]
249 #if TARGET_JVM
250                 [NUnit.Framework.Category ("NotWorking")]
251 #endif
252                 [ExpectedException (typeof (NotSupportedException))]
253                 public void TypeDescriptor_ConvertFrom_Bitmap ()
254                 {
255                         imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, new Bitmap (20, 20));
256                 }
257
258                 [Test]
259 #if TARGET_JVM
260                 [NUnit.Framework.Category ("NotWorking")]
261 #endif
262                 [ExpectedException (typeof (NotSupportedException))]
263                 public void TypeDescriptor_ConvertFrom_Point ()
264                 {
265                         imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, new Point (10, 10));
266                 }
267
268                 [Test]
269 #if TARGET_JVM
270                 [NUnit.Framework.Category ("NotWorking")]
271 #endif
272                 [ExpectedException (typeof (NotSupportedException))]
273                 public void TypeDescriptor_ConvertFrom_SizeF ()
274                 {
275                         imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, new SizeF (10, 10));
276                 }
277
278                 [Test]
279 #if TARGET_JVM
280                 [NUnit.Framework.Category ("NotWorking")]
281 #endif
282                 [ExpectedException (typeof (NotSupportedException))]
283                 public void TypeDescriptor_ConvertFrom_Object ()
284                 {
285                         imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, new Object ());
286                 }
287
288                 [Test]
289 #if TARGET_JVM
290                 [NUnit.Framework.Category ("NotWorking")]
291 #endif
292                 public void ConvertTo ()
293                 {
294                         Assert.AreEqual (imageStr, (String) imgConv.ConvertTo (null, CultureInfo.InvariantCulture,
295                                 image, typeof (string)), "CT#1");
296
297                         Assert.AreEqual (imageStr, (String) imgConv.ConvertTo (image, typeof (string)), "CT#1a");
298
299                         Assert.AreEqual (imageStr, (String) imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture,
300                                 image, typeof (string)), "CT#1A");
301
302                         Assert.AreEqual (imageStr, (String) imgConvFrmTD.ConvertTo (image, typeof (string)), "CT#1aA");
303                 }
304                                 
305                 [Test]
306                 [NUnit.Framework.Category ("NotWorking")]
307                 public void ConvertTo_ByteArray ()
308                 {
309                         byte[] newImageBytes = (byte[]) imgConv.ConvertTo (null, CultureInfo.InvariantCulture,
310                                 image, imageBytes.GetType ());
311
312                         Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2");
313
314                         newImageBytes = (byte[]) imgConv.ConvertTo (image, imageBytes.GetType ());
315                         
316                         Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2a");
317
318                         newImageBytes = (byte[]) imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture,
319                                 image, imageBytes.GetType ());
320
321                         Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2A");
322
323                         newImageBytes = (byte[]) imgConvFrmTD.ConvertTo (image, imageBytes.GetType ());
324                         
325                         Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2aA");
326                 }
327
328                 [Test]
329 #if TARGET_JVM
330                 [NUnit.Framework.Category ("NotWorking")]
331 #endif
332                 [ExpectedException (typeof (NotSupportedException))]
333                 public void ConvertTo_Rectangle ()
334                 {
335                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Rectangle));
336                 }
337
338                 [Test]
339 #if TARGET_JVM
340                 [NUnit.Framework.Category ("NotWorking")]
341 #endif
342                 [ExpectedException (typeof (NotSupportedException))]
343                 public void ConvertTo_Image ()
344                 {
345                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, image.GetType ());
346                 }
347
348                 [Test]
349 #if TARGET_JVM
350                 [NUnit.Framework.Category ("NotWorking")]
351 #endif
352                 [ExpectedException (typeof (NotSupportedException))]
353                 public void ConvertTo_Size ()
354                 {
355                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Size));
356                 }
357
358                 [Test]
359 #if TARGET_JVM
360                 [NUnit.Framework.Category ("NotWorking")]
361 #endif
362                 [ExpectedException (typeof (NotSupportedException))]
363                 public void ConvertTo_Bitmap ()
364                 {
365                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Bitmap));
366                 }
367
368                 [Test]
369 #if TARGET_JVM
370                 [NUnit.Framework.Category ("NotWorking")]
371 #endif
372                 [ExpectedException (typeof (NotSupportedException))]
373                 public void ConvertTo_Point ()
374                 {
375                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Point));
376                 }
377
378                 [Test]
379 #if TARGET_JVM
380                 [NUnit.Framework.Category ("NotWorking")]
381 #endif
382                 [ExpectedException (typeof (NotSupportedException))]
383                 public void ConvertTo_Metafile ()
384                 {
385                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Metafile));
386                 }
387
388                 [Test]
389 #if TARGET_JVM
390                 [NUnit.Framework.Category ("NotWorking")]
391 #endif
392                 [ExpectedException (typeof (NotSupportedException))]
393                 public void ConvertTo_Object ()
394                 {
395                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Object));
396                 }
397
398                 [Test]
399 #if TARGET_JVM
400                 [NUnit.Framework.Category ("NotWorking")]
401 #endif
402                 [ExpectedException (typeof (NotSupportedException))]
403                 public void ConvertTo_Int ()
404                 {
405                         imgConv.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (int));
406                 }
407
408                 [Test]
409 #if TARGET_JVM
410                 [NUnit.Framework.Category ("NotWorking")]
411 #endif
412                 [ExpectedException (typeof (NotSupportedException))]
413                 public void TypeDescriptor_ConvertTo_Rectangle ()
414                 {
415                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Rectangle));
416                 }
417
418                 [Test]
419 #if TARGET_JVM
420                 [NUnit.Framework.Category ("NotWorking")]
421 #endif
422                 [ExpectedException (typeof (NotSupportedException))]
423                 public void TypeDescriptor_ConvertTo_Image ()
424                 {
425                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, image.GetType ());
426                 }
427
428                 [Test]
429 #if TARGET_JVM
430                 [NUnit.Framework.Category ("NotWorking")]
431 #endif
432                 [ExpectedException (typeof (NotSupportedException))]
433                 public void TypeDescriptor_ConvertTo_Size ()
434                 {
435                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Size));
436                 }
437
438                 [Test]
439 #if TARGET_JVM
440                 [NUnit.Framework.Category ("NotWorking")]
441 #endif
442                 [ExpectedException (typeof (NotSupportedException))]
443                 public void TypeDescriptor_ConvertTo_Bitmap ()
444                 {
445                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Bitmap));
446                 }
447
448                 [Test]
449 #if TARGET_JVM
450                 [NUnit.Framework.Category ("NotWorking")]
451 #endif
452                 [ExpectedException (typeof (NotSupportedException))]
453                 public void TypeDescriptor_ConvertTo_Point ()
454                 {
455                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Point));
456                 }
457
458                 [Test]
459 #if TARGET_JVM
460                 [NUnit.Framework.Category ("NotWorking")]
461 #endif
462                 [ExpectedException (typeof (NotSupportedException))]
463                 public void TypeDescriptor_ConvertTo_Metafile ()
464                 {
465                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Metafile));
466                 }
467
468                 [Test]
469 #if TARGET_JVM
470                 [NUnit.Framework.Category ("NotWorking")]
471 #endif
472                 [ExpectedException (typeof (NotSupportedException))]
473                 public void TypeDescriptor_ConvertTo_Object ()
474                 {
475                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (Object));
476                 }
477
478                 [Test]
479 #if TARGET_JVM
480                 [NUnit.Framework.Category ("NotWorking")]
481 #endif
482                 [ExpectedException (typeof (NotSupportedException))]
483                 public void TypeDescriptor_ConvertTo_Int ()
484                 {
485                         imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, image, typeof (int));
486                 }
487
488                 [Test]
489 #if TARGET_JVM
490                 [NUnit.Framework.Category ("NotWorking")]
491 #endif
492                 public void TestGetPropertiesSupported ()
493                 {
494                         Assert.IsTrue (imgConv.GetPropertiesSupported (), "GPS#1");
495                         Assert.IsTrue (imgConv.GetPropertiesSupported (null), "GPS#2");
496                 }
497
498                 [Test]
499 #if TARGET_JVM
500                 [NUnit.Framework.Category ("NotWorking")]
501 #endif
502                 public void TestGetProperties ()
503                 {
504 #if NET_2_0
505                         int basecount = 1;
506 #else
507                         int basecount = 0;
508 #endif
509                         PropertyDescriptorCollection propsColl;
510
511                         propsColl = imgConv.GetProperties (null, image, null);
512                         Assert.AreEqual (13 + basecount, propsColl.Count, "GP1#1");
513                         
514                         propsColl = imgConv.GetProperties (null, image);
515                         Assert.AreEqual (6 + basecount, propsColl.Count, "GP1#2");
516
517                         propsColl = imgConv.GetProperties (image);
518                         Assert.AreEqual (6 + basecount, propsColl.Count, "GP1#3");
519
520                         propsColl = TypeDescriptor.GetProperties (typeof (Image));
521                         Assert.AreEqual (13 + basecount, propsColl.Count, "GP1#4");
522                         
523                         propsColl = imgConvFrmTD.GetProperties (null, image, null);
524                         Assert.AreEqual (13 + basecount, propsColl.Count, "GP1#1A");
525                         
526                         propsColl = imgConvFrmTD.GetProperties (null, image);
527                         Assert.AreEqual (6 + basecount, propsColl.Count, "GP1#2A");
528
529                         propsColl = imgConvFrmTD.GetProperties (image);
530                         Assert.AreEqual (6 + basecount, propsColl.Count, "GP1#3A");
531                 }
532         }
533 }