#WUDSN IDE Converter Parameters
#Tue Sep 17 01:09:19 CEST 2019
converterDirection=FILES_TO_IMAGE
filesConverterParameters.converterId=com.wudsn.ide.gfx.converter.atari8bit.LinearBitMapGraphics9Converter
filesConverterParameters.imageAspect.factorX=2
filesConverterParameters.imageAspect.factorY=1
filesConverterParameters.displayAspect.factorX=1
filesConverterParameters.displayAspect.factorY=1
filesConverterParameters.displayShrinkToFit=false
filesConverterParameters.displayZoomToFit=true
filesConverterParameters.sourceFiles=1
filesConverterParameters.sourceFiles.0.path=
filesConverterParameters.sourceFiles.0.offset=0
filesConverterParameters.imageFilePath=
filesConverterParameters.columns=40
filesConverterParameters.rows=24
filesConverterParameters.spacingColor.red=0
filesConverterParameters.spacingColor.green=0
filesConverterParameters.spacingColor.blue=128
filesConverterParameters.spacingWidth=0
filesConverterParameters.palette=HIRES_1
filesConverterParameters.paletteType=ATARI_DEFAULT
filesConverterParameters.paletteRGBs=16
filesConverterParameters.paletteRGBs.0.red=0
filesConverterParameters.paletteRGBs.0.green=0
filesConverterParameters.paletteRGBs.0.blue=0
filesConverterParameters.paletteRGBs.1.red=51
filesConverterParameters.paletteRGBs.1.green=51
filesConverterParameters.paletteRGBs.1.blue=51
filesConverterParameters.paletteRGBs.2.red=102
filesConverterParameters.paletteRGBs.2.green=102
filesConverterParameters.paletteRGBs.2.blue=102
filesConverterParameters.paletteRGBs.3.red=153
filesConverterParameters.paletteRGBs.3.green=153
filesConverterParameters.paletteRGBs.3.blue=153
filesConverterParameters.paletteRGBs.4.red=204
filesConverterParameters.paletteRGBs.4.green=204
filesConverterParameters.paletteRGBs.4.blue=204
filesConverterParameters.paletteRGBs.5.red=255
filesConverterParameters.paletteRGBs.5.green=255
filesConverterParameters.paletteRGBs.5.blue=255
filesConverterParameters.paletteRGBs.6.red=0
filesConverterParameters.paletteRGBs.6.green=0
filesConverterParameters.paletteRGBs.6.blue=0
filesConverterParameters.paletteRGBs.7.red=0
filesConverterParameters.paletteRGBs.7.green=0
filesConverterParameters.paletteRGBs.7.blue=0
filesConverterParameters.paletteRGBs.8.red=0
filesConverterParameters.paletteRGBs.8.green=0
filesConverterParameters.paletteRGBs.8.blue=0
filesConverterParameters.paletteRGBs.9.red=0
filesConverterParameters.paletteRGBs.9.green=0
filesConverterParameters.paletteRGBs.9.blue=0
filesConverterParameters.paletteRGBs.10.red=0
filesConverterParameters.paletteRGBs.10.green=0
filesConverterParameters.paletteRGBs.10.blue=0
filesConverterParameters.paletteRGBs.11.red=0
filesConverterParameters.paletteRGBs.11.green=0
filesConverterParameters.paletteRGBs.11.blue=0
filesConverterParameters.paletteRGBs.12.red=0
filesConverterParameters.paletteRGBs.12.green=0
filesConverterParameters.paletteRGBs.12.blue=0
filesConverterParameters.paletteRGBs.13.red=0
filesConverterParameters.paletteRGBs.13.green=0
filesConverterParameters.paletteRGBs.13.blue=0
filesConverterParameters.paletteRGBs.14.red=0
filesConverterParameters.paletteRGBs.14.green=0
filesConverterParameters.paletteRGBs.14.blue=0
filesConverterParameters.paletteRGBs.15.red=0
filesConverterParameters.paletteRGBs.15.green=0
filesConverterParameters.paletteRGBs.15.blue=0
imageConverterParameters.converterId=com.wudsn.ide.gfx.converter.generic.CharSet1x1HiresConverter
imageConverterParameters.imageAspect.factorX=1
imageConverterParameters.imageAspect.factorY=1
imageConverterParameters.displayAspect.factorX=1
imageConverterParameters.displayAspect.factorY=2
imageConverterParameters.displayShrinkToFit=true
imageConverterParameters.displayZoomToFit=false
imageConverterParameters.imageFilePath=Charset-256.chr.png
imageConverterParameters.targetFiles=10
imageConverterParameters.targetFiles.0.path=
imageConverterParameters.targetFiles.1.path=
imageConverterParameters.targetFiles.2.path=
imageConverterParameters.targetFiles.3.path=
imageConverterParameters.targetFiles.4.path=
imageConverterParameters.targetFiles.5.path=
imageConverterParameters.targetFiles.6.path=
imageConverterParameters.targetFiles.7.path=
imageConverterParameters.targetFiles.8.path=
imageConverterParameters.targetFiles.9.path=
imageConverterParameters.useDefaultScript=true
imageConverterParameters.script=function convertToFileData(data) {\r\n\tvar columns \= data.getImageDataWidth()  / 8;\r\n\tvar rows    \= data.getImageDataHeight() / 8;\r\n\tvar chars   \= 256;\r\n\r\n\tvar char \= 0;\r\n\tvar bytes \= [];\r\n\tvar offset \= 0;\r\n\tfor (var r \= 0; r < rows; r++) {\r\n\t\tfor (var c \= 0; c < columns; c++) {\r\n\t\t\tif (char < chars) {\r\n\t\t\t\tfor (var l\=0;l<8;l++) {\r\n\t\t\t\t\tvar b \= 0;\r\n\t\t\t\t\tfor (var p \= 0; p < 8; p++) {\r\n\t\t    \t\t\tvar color;\r\n\t\t    \t\t\tcolor \= data.getPixel(c*8+p, r*8+l);\r\n\t\t    \t\t\tif (color \!\= 0) {\r\n\t\t\t\t\t\t\tb \= b | 1 << 7 - p;\r\n\t\t    \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbytes[offset++] \= b;\r\n    \t\t\t}\r\n\t\t\tchar++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tdata.setTargetFileObject(0, bytes);\r\n}
