Hello,
Do you have any idea to resize Vector graphic using some maths trick?
It's example to create Vector image 10x10px and write A
Local $a10x10 = [ _
1,1,1,1,1,1,1,1,1,1, _
1,1,1,0,0,0,0,1,1,1, _
1,1,0,0,1,1,0,0,1,1, _
1,1,0,1,1,1,1,0,1,1, _
1,1,0,1,1,1,1,0,1,1, _
1,1,0,0,0,0,0,0,1,1, _
1,1,0,1,1,1,1,0,1,1, _
1,1,0,1,1,1,1,0,1,1, _
1,0,0,0,1,1,0,0,0,1, _
1,1,1,1,1,1,1,1,1,1 _
]
Local $oVector = ObjCreate("WIA.Vector.1")
If Not IsObj($oVector) Then
ConsoleWrite("+++ Error " & @error & " durning create a Vector.object." & @CRLF)
Exit
EndIf
Local $iBlue = 0xFF0000FF ; ARGB color
Local $iWhite = 0xFFFFFFFF
; adding pixels to vector
For $i = 0 To UBound($a10x10) - 1
Local $iPixel = $a10x10[$i]
Local $iColor = $iBlue
If $iPixel = 0 Then $iColor = $iWhite
$oVector.Add($iColor)
Next
; create a img 10x10 px
Local $oImg = $oVector.ImageFile(10, 10)
; path to file
Local $sPath = @ScriptDir & "\Vector.bmp"
; delete previous file if exits.
FileDelete($sPath)
; save img to script direction.
$oImg.SaveFile($sPath)
; show result, you have to use 800% size to see effects.
ShellExecute("Vector.bmp")