How to know the attributes of a pixel in the image
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
Thank you very much, Roger! Everything works perfectly and makes even Belsch than I expected. This will allow me to do what I wanted.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
Thank you, skiman!skiman wrote:Hi,
It looks as the freeimage wrapper isn't on the webboard.
I uploaded a ZIP with everything: DLL, sample prg and documentation. There is a section 'Pixel access functions' in the manual.
http://www.abowebhosting.be/download/freeimage.zip
Looked documentation. In my opinion, everything is done very well, a good set of features. But could not do anything to compile and run. Assembling project test1.xpj does not work. This is the newest version?
PS
I have a file that describes the structure of the system "Aidos", but it is in Russian.
Re: How to know the attributes of a pixel in the image
what Xbase++ Version do you useEugene Lutsenko wrote:But could not do anything to compile and run. Assembling project test1.xpj does not work. This is the newest version?

those 2 PRG are only "Wrapper" for FreeImage.dll so it MUST work with all Xbase++ Version except Alaska have change C-API

p.s. include ot4xb is Version 1.4.201.49 so update to lates 1.6.0.167 http://www.xbwin.com
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
Auge_Ohr wrote:what Xbase++ Version do you useEugene Lutsenko wrote:But could not do anything to compile and run. Assembling project test1.xpj does not work. This is the newest version?![]()
those 2 PRG are only "Wrapper" for FreeImage.dll so it MUST work with all Xbase++ Version except Alaska have change C-API![]()
p.s. include ot4xb is Version 1.4.201.49 so update to lates 1.6.0.167 http://www.xbwin.com
Perhaps this is too much for me. While I will try to do that gave Roger. Basically, he gave what I lacked in the standard set of graphical functions Alaska.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
Hi, Roger!
Your program works fine and does what I need. But I can not use it in your system. It seems to me that this is due to the following snippet of text that I do not understand. Understand the exact function and the way to implement them I do not know. When you try to insert your program in which I develop, compile-time error that I could not overcome.
[/size]
Your program works fine and does what I need. But I can not use it in your system. It seems to me that this is due to the following snippet of text that I do not understand. Understand the exact function and the way to implement them I do not know. When you try to insert your program in which I develop, compile-time error that I could not overcome.
Code: Select all
#command GDIFUNCTION <Func>([<x,...>]) ;
=> ;
FUNCTION <Func>([<x>]);;
STATIC scHCall := nil ;;
IF scHCall == nil ;;
IF snHdll == nil ;;
snHDll := DllLoad('GDI32.DLL') ;;
ENDIF ;;
scHCall := DllPrepareCall(snHDll,DLL_STDCALL,<(Func)>) ;;
ENDIF ;;
RETURN DllExecuteCall(scHCall,<x>)
GDIFUNCTION GetPixel( nHDC, x, y)
GDIFUNCTION SetPixel( nHDC, x, y, n )
DLLFUNCTION GetWindowDC( hwnd ) USING STDCALL FROM USER32.DLL
Re: How to know the attributes of a pixel in the image
The command GDIFUNCTION was written to create an interface to the Windows API functions: GetPixel() and SetPixel().
Normally, this would be done with DLLFUNCTION, but that would be slower because it would have to call DllPrepareCall() every time GetPixel() or SetPixel() is called. The STATIC variable makes this unnecessary and therefore faster.
Your problem is probably that you are not including DLL.CH.
Add the following to the top of your code:
#include "DLL.CH"
Normally, this would be done with DLLFUNCTION, but that would be slower because it would have to call DllPrepareCall() every time GetPixel() or SetPixel() is called. The STATIC variable makes this unnecessary and therefore faster.
Your problem is probably that you are not including DLL.CH.
Add the following to the top of your code:
#include "DLL.CH"
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
No, that's not it. These things I understand. I'll try to understand itself. If not, then I will ask to help.
Re: How to know the attributes of a pixel in the image
Tell me what compile error you are getting.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: How to know the attributes of a pixel in the image
Just what I read. There's just been a redefinition of the function. Everything worked! THANK YOU!

Now, based on this, I will do what is intended. By the way, how do you know what the dimension of the image file (in pixels)?

Now, based on this, I will do what is intended. By the way, how do you know what the dimension of the image file (in pixels)?