Fast read pixel of the image file

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Fast read pixel of the image file

#31 Post by Eugene Lutsenko »

Thank you, Roger! I will try to learn and use. The results are presented to the board.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Fast read pixel of the image file

#32 Post by Eugene Lutsenko »

Roger! I get to work with the standard graphic functions only in your test function and another function of another variable oStatic. In other features, the schedule hangs or error occurs when you create a graphic object. Please, help. Maybe for each function needs its own oStatic?

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Fast read pixel of the image file

#33 Post by Auge_Ohr »

Eugene Lutsenko wrote:Maybe for each function needs its own oStatic?
Windows use Device Context (hDC) while Xbase++ use Presspace (oPS)
if you want to "paint" with Windows API into Presspace you have to assign it as Device.

Code: Select all

   // make the presentation space and assign to Device
   //
   ::oPS := XBpPresSpace():New()
   ::oPS:Create(::Static1:WinDevice())
   ::oPS:mode := XBPPS_MODE_HIGH_PRECISION

   // hDC need for DLLcall
   //
   ::hDC := ::Static1:winDevice():getHDC()
i recommend to use Xbase++ Presspace and GRA Function to "paint" Lines and Circles.
i only use ::hDC for GetPixel() while Xbase++ does not have a GRA Function for it.
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Fast read pixel of the image file

#34 Post by Eugene Lutsenko »

Thank you, Jimmy!
I understand this and wanted. Roger gave an example and I based it did something very similar. But I was prepared to do so only partially, not fully. With these features Alaska I still feel some problemmy. Of course, I've seen and your implementation. But for me it is even more difficult. The problem in understanding the methods and classes. I will try next.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Fast read pixel of the image file

#35 Post by Auge_Ohr »

Eugene Lutsenko wrote:The problem in understanding the methods and classes. I will try next.
the Problem why i have not used your Code are your Variable ... some declare as PUBLIC and other not ... :roll:

i recommend to compile with /W and declare all Variable :pray:

iVar Member of a Class are also "visible" everywhere in Class ( PRG ) but you must declare it !
Methode are the same as Function or Procedure include Parameter Syntax.
the benefit are those Class iVar which you do not have to pass as Parameter ... like a fieldwide STATIC (on Top) in a PRG.
greetings by OHR
Jimmy

Post Reply