equal
deleted
inserted
replaced
720 |
720 |
721 ^Icon |
721 ^Icon |
722 constantNamed:'ImageEditor class cropSubImageIcon' |
722 constantNamed:'ImageEditor class cropSubImageIcon' |
723 ifAbsentPut:[(Depth2Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@J**@@BUU @@%UX@@IUV@@BUU @@%UX@@J**@@@@@@@@@@@@@@@@@@b') |
723 ifAbsentPut:[(Depth2Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@J**@@BUU @@%UX@@IUV@@BUU @@%UX@@J**@@@@@@@@@@@@@@@@@@b') |
724 colorMapFromArray:#[0 0 0 255 255 255 127 127 127 0 255 0] |
724 colorMapFromArray:#[0 0 0 255 255 255 127 127 127 0 255 0] |
725 mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'??2@AH@D OR_=I?4''?R_9K?$/>R?9K0D @S??@@a'); yourself); yourself] |
725 mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'??2@AH@D.@R?9K?$''>R_9I?$''?R_=HA4 @S??@@a'); yourself); yourself] |
726 ! |
726 ! |
727 |
727 |
728 darkerIcon |
728 darkerIcon |
729 "This resource specification was automatically generated |
729 "This resource specification was automatically generated |
730 by the ImageEditor of ST/X." |
730 by the ImageEditor of ST/X." |
4264 labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
4264 labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
4265 choice: editMode |
4265 choice: editMode |
4266 choiceValue: pasteUnder |
4266 choiceValue: pasteUnder |
4267 ) |
4267 ) |
4268 (MenuItem |
4268 (MenuItem |
|
4269 activeHelpKey: drawModeCropSubImage |
|
4270 enabled: imageIsLoadedHolder |
|
4271 label: 'Crop SubImage' |
|
4272 translateLabel: true |
|
4273 isButton: true |
|
4274 labelImage: (ResourceRetriever ImageEditor cropSubImageIcon) |
|
4275 choice: editMode |
|
4276 choiceValue: cropSubImage |
|
4277 ) |
|
4278 (MenuItem |
4269 activeHelpKey: drawModeSpecial |
4279 activeHelpKey: drawModeSpecial |
4270 enabled: imageIsLoadedHolder |
4280 enabled: imageIsLoadedHolder |
4271 label: 'Special' |
4281 label: 'Special' |
4272 translateLabel: true |
4282 translateLabel: true |
4273 isButton: true |
4283 isButton: true |
4278 ) |
4288 ) |
4279 nil |
4289 nil |
4280 nil |
4290 nil |
4281 ) |
4291 ) |
4282 |
4292 |
4283 "Modified: / 22-02-2017 / 20:38:55 / cg" |
4293 "Modified: / 24-08-2017 / 20:53:02 / cg" |
4284 ! ! |
4294 ! ! |
4285 |
4295 |
4286 !ImageEditor class methodsFor:'tableColumns specs'! |
4296 !ImageEditor class methodsFor:'tableColumns specs'! |
4287 |
4297 |
4288 colorTableColumns |
4298 colorTableColumns |
7159 |
7169 |
7160 "Modified: / 22-02-2017 / 19:45:29 / cg" |
7170 "Modified: / 22-02-2017 / 19:45:29 / cg" |
7161 ! |
7171 ! |
7162 |
7172 |
7163 reduceNumberOfColors |
7173 reduceNumberOfColors |
|
7174 "reduce by masking off r/g/b bits" |
|
7175 |
7164 |s n anyChange img usedColors| |
7176 |s n anyChange img usedColors| |
7165 |
7177 |
7166 s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
7178 s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
7167 s size == 0 ifTrue:[^ self]. |
7179 s size == 0 ifTrue:[^ self]. |
7168 |
7180 |
7189 ] |
7201 ] |
7190 ] |
7202 ] |
7191 ]. |
7203 ]. |
7192 |
7204 |
7193 "Modified: / 29-10-2010 / 18:08:01 / cg" |
7205 "Modified: / 29-10-2010 / 18:08:01 / cg" |
|
7206 "Modified (comment): / 24-08-2017 / 20:50:28 / cg" |
7194 ! |
7207 ! |
7195 |
7208 |
7196 reduceNumberOfColors2 |
7209 reduceNumberOfColors2 |
|
7210 "reduce by rounding r/g/b channel values" |
|
7211 |
7197 |s rndR rndG rndB usedColors image newImage| |
7212 |s rndR rndG rndB usedColors image newImage| |
7198 |
7213 |
7199 s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
7214 s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
7200 s size == 0 ifTrue:[^ self]. |
7215 s size == 0 ifTrue:[^ self]. |
7201 rndR := Integer readFrom:s onError:0. |
7216 rndR := Integer readFrom:s onError:0. |
7259 Dialog information:(nUsed printString , ' colors used.') |
7274 Dialog information:(nUsed printString , ' colors used.') |
7260 ] |
7275 ] |
7261 ]. |
7276 ]. |
7262 |
7277 |
7263 "Modified: / 24-08-2017 / 18:25:04 / cg" |
7278 "Modified: / 24-08-2017 / 18:25:04 / cg" |
|
7279 "Modified (comment): / 24-08-2017 / 20:50:14 / cg" |
7264 ! |
7280 ! |
7265 |
7281 |
7266 selectColor:aColor |
7282 selectColor:aColor |
7267 |idx img cMap| |
7283 |idx img cMap| |
7268 |
7284 |