Sign in to follow this  
Followers 0
torels

a little Bitmap reading question

5 posts in this topic

Hi there

I made this script

$string="Hello World!"&@CRLF&"The quick, brown fox Jumped over the lazy dog."&@CRLF&".,'\1234567890'"&@CRLF& _
"|!""£$%&/()=?^.,:;-_<>"
$y = 0
$x = 0
$length = StringLen($string)+$x
$LineHeight = 90-32+$y
GUICreate("",$length,$LineHeight)
GUISetBkColor(0x000000)
GUISetState()
$string = StringUpper($string)
For $i = 1 to StringLen($string)
    If StringMid($string,$i,1)=@LF OR StringMid($string,$i,1)=@CR OR StringMid($string,$i,1)=@CRLF Then
        $x += 1
    Else
        GUICtrlCreateLabel("",$x,$y,1,Asc(StringMid($string,$i,1))-32)
        GUICtrlSetBkColor(-1,0xFFFFFF)
        $x+=1
    EndIf
Next
while 1
    If GUIGetMsg() = -3 then Exit
WEnd

supposing that what you have in the gui will go on a bitmap instead

how could I read the bitmap to get each line's length and consequantly be able to decode the string ?

basically it's just about getting each line's length (width=1px)

btw... the white parts are the ones to be read

thanks in advance :)


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites



torels,

Using PixelGetColor in a series of suitable loops seems a pretty good way to get what you want.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

yes I thopught of that... but I was looking for a way of doing it without having the image shown

maybe using GDI+ ... but I do'nt know how to do that XD

Edited by torels

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

torels,

If you save the image in 24-bit Bitmap format, it would not be difficult to read the internal structure without having to display the image. But for a simple black/white image, that would mean an enormous size overhead - unless you compressed it yourself once it had been created......

I have done a quick search on the forums and there are some threads about searching hidden windows for pixels. Perhaps that might be something to look into?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

ok thanks... I think i'll try it

anyway i've expressed myself badly... it isn't a bmp but any kind of image :)

thanks for your help


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0