Thanks/Gracias Master Nages.
#include "FiveWin.ch"
FUNCTION ImagePixels()
LOCAL hBmp := FW_ReadImage( NIL, "https://thumb.cloud.mail.ru/weblink/thumb/xw1/NipP/v5trqrynQ" )[ 1 ]
LOCAL aClrs, cFileTxt := "NAGES.TXT", cTxt, cText
aClrs := ReadBmpPixels( hBmp )
DeleteObject( hBmp )
XBROWSER aClrs SHOW SLNUM
cTxt := {aClrs}
MEMOWRIT( cFileTxt, FW_ValToExp( cTxt ) )
WinExec( "Notepad.exe " + cFileTxt )
RETURN NIL
STATIC FUNCTION ReadBmpPixels( hBmp )
LOCAL hBmpOld, hDC0, hDC
LOCAL nBmpWidth := nBmpWidth( hBmp )
LOCAL nBmpHeight := nBmpHeight( hBmp )
LOCAL nRow, nCol, nClr, aCol
LOCAL aClrs := {}
hDC0 := GetDC( 0 )
hDC := CreateCompatibleDC( HDC0 )
hBmpOld := SelectObject( hDC, hBmp )
nRow := 3 // can be any
AAdd( aClrs, aCol := { 1, 1, nClr := GetPixel( hDC, 1, 1 ), cClrToCode( nClr ) } )
FOR nCol := 2 TO nBmpWidth - 1
nClr := GetPixel( hDC, nCol, nRow )
IF nClr == aCol[ 3 ]
aCol[ 2 ] := nCol
ELSE
aCol := { nCol, nCol, nClr, cClrToCode( nClr ) }
AAdd( aClrs, aCol )
ENDIF
NEXT nCol
SelectObject( hDC, hBmpOld )
Deletedc( hdc )
ReleaseDC( 0, hDC0 )
RETURN aClrs
// FIN / END
Regards, saludos.