RegressionTests__ImageReaderTest.st
author Claus Gittinger <cg@exept.de>
Mon, 07 Mar 2016 14:28:56 +0100
changeset 1338 9e39590870b2
parent 1334 7361d2e60e51
child 1339 fe9f7d42c564
permissions -rw-r--r--
#BUGFIX class: RegressionTests::ImageReaderTest added: #test_bmp_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1338
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
     1
"{ Encoding: utf8 }"
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
     2
356
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'exept:regression' }"
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: RegressionTests }"
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
TestCase subclass:#ImageReaderTest
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'tests-Regression'
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
!ImageReaderTest class methodsFor:'documentation'!
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
documentation
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
"
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    documentation to be added.
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
    [author:]
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
        cg (cg@AQUA-DUO)
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    [instance variables:]
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    [class variables:]
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
    [see also:]
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
"
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
! !
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
!ImageReaderTest methodsFor:'tests'!
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    34
test001_bmp
356
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    |img|
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    37
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test1.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    38
    self assert:(img notNil).
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    39
    self assert:(img depth == 1).
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
    40
    
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    41
    "/ img inspect.
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
    42
    
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    43
    self assert:((img colorAtX:0 y:0) rgbValue = 16r4040FF).
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    44
    self assert:((img colorAtX:0 y:63) rgbValue = 16r4040FF).
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    45
    self assert:((img colorAtX:0 y:18) rgbValue = 16r40FF40).
356
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    48
     self run:#test001_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    49
     self new test001_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    50
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    51
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    52
test002_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    53
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    54
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    55
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test4.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    56
    self assert:(img notNil).
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    57
    self assert:(img depth == 4).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    58
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    59
    self assert:((img colorAtX:0 y:15) rgbValue = 16rFF0000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    60
    self assert:((img colorAtX:35 y:15) rgbValue = 16r004000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    61
    self assert:((img colorAtX:35 y:30) rgbValue = 16r008000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    62
    self assert:((img colorAtX:35 y:45) rgbValue = 16r00C000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    63
    self assert:((img colorAtX:35 y:60) rgbValue = 16r00FF00).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    64
    self assert:((img colorAtX:70 y:15) rgbValue = 16r0000FF).
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
    65
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    66
    "/ img inspect.
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    67
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    68
     self run:#test002_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    69
     self new test002_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    70
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    71
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    72
test003_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    73
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    74
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    75
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test8.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    76
    self assert:(img notNil).
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    77
    self assert:(img depth == 8).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    78
    self assert:((img colorAtX:30 y:0) rgbValue = 16rFF0000).
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
    79
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    80
    "/ img inspect
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    81
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    82
     self run:#test003_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    83
     self new test003_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    84
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    85
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    86
test004_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    87
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    88
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    89
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/testcompress4.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    90
    self assert:(img notNil).
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    91
    self assert:(img depth == 4).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    92
    self assert:((img colorAtX:0 y:15) rgbValue = 16rFF0000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    93
    self assert:((img colorAtX:35 y:15) rgbValue = 16r004000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    94
    self assert:((img colorAtX:35 y:30) rgbValue = 16r008000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    95
    self assert:((img colorAtX:35 y:45) rgbValue = 16r00C000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    96
    self assert:((img colorAtX:35 y:60) rgbValue = 16r00FF00).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    97
    self assert:((img colorAtX:70 y:15) rgbValue = 16r0000FF).
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
    98
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
    99
    "/ img inspect.
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   100
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   101
     self run:#test004_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   102
     self new test004_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   103
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   104
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   105
test005_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   106
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   107
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   108
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/testcompress8.bmp').
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   109
    self assert:(img notNil).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   110
    self assert:(img depth == 8).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   111
    self assert:((img colorAtX:30 y:0) rgbValue = 16rFF0000).
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   112
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   113
    "/ img inspect.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   114
    "
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   115
     self run:#test005_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   116
     self new test005_bmp"
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   117
!
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   118
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   119
test006_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   120
    |img|
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   121
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   122
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test8os2.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   123
    self assert:(img notNil).
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   124
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   125
    "/ img inspect.
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   126
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   127
     self run:#test006_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   128
     self new test006_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   129
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   130
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   131
test007_bmp
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   132
    |img|
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   133
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   134
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test4os2v2.bmp').
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   135
    self assert:(img notNil).
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   136
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   137
    "/ img inspect.
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   138
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   139
     self run:#test007_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   140
     self new test007_bmp"
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   141
!
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   142
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   143
test008_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   144
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   145
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   146
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test16.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   147
    self assert:(img notNil).
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   148
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   149
    "/ img inspect.
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   150
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   151
     self run:#test008_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   152
     self new test008_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   153
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   154
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   155
test009_bmp
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   156
    |img|
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   157
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   158
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test24.bmp').
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   159
    self assert:(img notNil).
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   160
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   161
    "/ img inspect.
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   162
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   163
     self run:#test009_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   164
     self new test009_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   165
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   166
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   167
test010_bmp
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   168
    |img|
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   169
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   170
    img := Image fromFile:(self class packageDirectory construct:'testData/bmpImages/test32.bmp').
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   171
    self assert:(img notNil).
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   172
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   173
    "/ img inspect.
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   174
    "
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   175
     self run:#test010_bmp
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   176
     self new test010_bmp"
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   177
!
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   178
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   179
test101
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   180
    |alpha s bits img|
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   181
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   182
    img := Depth32Image width:16 height:16.
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   183
    alpha := #[
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   184
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   185
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   186
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   187
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   188
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   189
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   190
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   191
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   192
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   193
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   194
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   195
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   196
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   197
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   198
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   199
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   200
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   201
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   202
                    0 0 0 0 63 63 63 63 127 127 127 127 255 255 255 255
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   203
              ].
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   204
    s := WriteStream on:#[].
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   205
    alpha do:[:a |
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   206
        s nextPut:127.    "/ r
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   207
        s nextPut:127.    "/ g
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   208
        s nextPut:127.    "/ b
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   209
        s nextPut:a.    
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   210
    ].
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   211
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   212
    bits := (s contents).
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   213
    img bits:bits.
699
3316cd60b7c2 changed: #test101
Claus Gittinger <cg@exept.de>
parents: 576
diff changeset
   214
    "/ img inspect.
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   215
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   216
    "
526
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   217
     self run:#test101
5494927465be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   218
     self new test101
357
01c5f0c27106 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 356
diff changeset
   219
    "
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   220
!
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   221
576
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   222
testPNG_001_basn0g01
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   223
    |img|
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   224
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   225
    img := Image fromFile:(self class packageDirectory construct:'testData/pngImages/basn0g01.png').
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   226
    self assert:(img notNil).
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   227
    self assert:(img depth == 1).
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   228
    self assert:(img extent = (32@32)).
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   229
    self assert:(img colorAt:(0@0)) = Color white.
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   230
    self assert:(img colorAt:(31@31)) = Color black.
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   231
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   232
    "/ img inspect.
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   233
    "
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   234
     self run:#testPNG_001_basn0g01
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   235
     self new testPNG_001_basn0g01
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   236
    "
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   237
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   238
    "Created: / 05-02-2011 / 10:32:32 / cg"
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   239
!
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   240
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   241
testPNG_002_basn0g02
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   242
    |img|
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   243
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   244
    img := Image fromFile:(self class packageDirectory construct:'testData/pngImages/basn0g02.png').
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   245
    self assert:(img notNil).
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   246
    self assert:(img depth == 2).
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   247
    self assert:(img extent = (32@32)).
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   248
    self assert:(img colorAt:(0@0)) rgbValue = 0.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   249
    self assert:(img colorAt:(31@31)) rgbValue = 16rAAAAAA.
576
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   250
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   251
    "/ img inspect.
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   252
    "
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   253
     self run:#testPNG_002_basn0g02
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   254
     self new testPNG_002_basn0g02
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   255
    "
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   256
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   257
    "Created: / 05-02-2011 / 10:33:24 / cg"
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   258
!
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   259
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   260
test_bmp_01
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   261
    |img allOK|
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   262
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   263
    allOK := true.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   264
    (self class packageDirectory construct:'testData/bmpImages') directoryContentsAsFilenamesDo:[:f |
1334
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   265
        (f isRegularFile and:[f hasSuffix:'bmp']) ifTrue:[
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   266
            Error handle:[:ex |
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   267
                img := nil.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   268
            ] do:[
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   269
                img := Image fromFile:f.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   270
            ].
1334
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   271
            img isNil ifTrue:[ 
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   272
                Transcript printf:'failed: %s\n' with:f baseName.
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   273
                allOK := false
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   274
            ].                
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   275
        ].
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   276
    ].
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   277
    self assert:allOK.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   278
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   279
    "
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   280
     self run:#test_bmp_01
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   281
     self new test_bmp_01
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   282
    "
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   283
!
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   284
1338
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   285
test_bmp_02
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   286
    |img allOK|
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   287
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   288
    allOK := true.
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   289
    (self class packageDirectory construct:'testData/bmpImages/bmpsuite-2.4') directoryContentsAsFilenamesDo:[:f |
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   290
        (f isRegularFile and:[f hasSuffix:'bmp']) ifTrue:[
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   291
            Error handle:[:ex |
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   292
                img := nil.
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   293
            ] do:[
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   294
                img := Image fromFile:f.
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   295
            ].
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   296
            img isNil ifTrue:[ 
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   297
                Transcript printf:'failed: %s\n' with:f baseName.
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   298
                allOK := false
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   299
            ].                
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   300
        ].
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   301
    ].
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   302
    self assert:allOK.
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   303
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   304
    "
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   305
     self run:#test_bmp_02
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   306
     self new test_bmp_02
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   307
    "
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   308
!
9e39590870b2 #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   309
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   310
test_png_01
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   311
    |img allOK|
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   312
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   313
    allOK := true.
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   314
    (self class packageDirectory construct:'testData/pngImages') directoryContentsAsFilenamesDo:[:f |
1334
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   315
        (f isRegularFile and:[f hasSuffix:'png']) ifTrue:[
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   316
            Error handle:[:ex |
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   317
                img := nil.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   318
            ] do:[
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   319
                img := Image fromFile:f.
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   320
            ].    
1334
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   321
            img isNil ifTrue:[ 
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   322
                Transcript printf:'failed: %s\n' with:f baseName.
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   323
                allOK := false 
7361d2e60e51 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 1326
diff changeset
   324
            ].
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   325
        ].
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   326
    ].
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   327
    self assert:allOK.
382
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   328
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   329
    "
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   330
     self run:#test_png_01
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   331
     self new test_png_01
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   332
    "
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   333
!
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   334
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   335
test_png_02
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   336
    |referenceImg img|
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   337
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   338
    img := Image fromFile:(self class packageDirectory construct:'testData/pngImages/basn0g01.png').
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   339
    self assert:(img notNil).
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   340
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   341
    referenceImg := (Depth1Image new) width: 32; height: 32; 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   342
                            photometric:(#palette); 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   343
                            bitsPerSample:(#[1]); 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   344
                            samplesPerPixel:(1); 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   345
                            bits:(ByteArray fromPackedString:'
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   346
?????/????3????8????<OO3?>C3<??@<?O? OL3?0C3L?8@<3O<@O G>@C8A?@@?L? @O3O0@C??8@@??<@@O?>@@C??@@@?? O8O?0C>C?8@00?<@LLO>@
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   347
C>C?@@? ? @LLO0@CCC8@@? <@@O8N@@@@C@@@@@ @@@@@@@@@@b') ; 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   348
                            colorMapFromArray:#[0 0 0 255 255 255]; 
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   349
                            yourself.
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   350
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   351
    self assert:(img asImageWithDepth:1) = (referenceImg asImageWithDepth:1).
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   352
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   353
    "
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   354
     self run:#test_png_02
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   355
     self new test_png_02
25933e1d5a67 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   356
    "
356
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
! !
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
!ImageReaderTest class methodsFor:'documentation'!
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
version
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
    ^ '$Header$'
576
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   363
!
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   364
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   365
version_CVS
0cbc67ca4ab3 png stuff
Claus Gittinger <cg@exept.de>
parents: 526
diff changeset
   366
    ^ '$Header$'
356
3f420735d670 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
! !
1326
3497aa4bf680 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
   368