From: Michael Rubinstein on
Saulo, this code fragment expected CAPaint.dll to be present and loaded. As
I stated, the code is a part of a library. It has an _Init() PROCEDURE I
neglected to mention:
PROCEDURE __MyPictureInit _INIT3 //whatever you call it

IF File(WorkDir()+"CAPaint.dll")

IF InitializeCAPaint()

_RegisterExit( @ExitCAPaint())

_DebOut32(String2Psz("CAPAINT.DLL is loaded"))

lCAPaint := TRUE

ENDIF

ENDIF

The piece of code I showed was executed within a library if GLOBAL lCAPaint
is TRUE. You don't need lCAPaint, but you have to make sure CAPaint.dll is
initialized. If CAPaint.dll is initialized and you still get an empty
poiner, go line by line starting with FindResource() line and look for empty
pointers. This is old VO2.5 code I don't use for development anymore, but
applications running it are still around. I don't use CAPaint.dll anymore,
there is a better way. You can send me a private email so we don't created
too much noise here and I don't have to disect my libraries.

Michael

"Saulo Rodrigues" <rj.saulo(a)gmail.com> wrote in message
news:1164218863.299971.54270(a)h54g2000cwb.googlegroups.com...
> Thanks Michael,
>
> I just did some tests with your class, but I get a problem at the
> following line:
>
> SELF:hBitmap :=
> CreateDIBitmap(hDC,pBmiHeader,CBM_INIT,pRGBQUAD,pBitmapInfo,DIB_RGB_COLORS)
>
>
> It returns a NULL_PTR value
>
> This is what I did:
>
> RESOURCE LOGOJPG MYJPG c:\images\image.jpg
>
> and:
>
> METHOD MyMethod CLASS MyDialogWindow
> LOCAL oJPG AS MyJPGBitMap
> oJPG := MyJPGBitmap{"LOGOJPG", SELF}
>
> Thanks in advance for your help.
> Saulo
>


From: Saulo Rodrigues on
Thanks Michael

> there is a better way. You can send me a private email so we don't created
> too much noise here and I don't have to disect my libraries.

That is great! I'll send an email soon. Thanks again for your time.

Regards
Saulo

From: Dirk (Belgium) on
Hi,

First CAPaint can only handle small jpeg files, thats why you have a
null_ptr. There is a function called "CAPaintLastErrorMsg()" which can
give you information about the error. There is also a function called
"CAPaintShowErrors(True)" and you will have an errorbox on screen (for
development purpose).

For large jpg, use fabpaint.

Yes, I use it. I load jpeg-file, show them on screen, lets make
changes to this bitmap by the user, and save it back to HD as jpeg.

Dirk

On 22 Nov 2006 02:38:54 -0800, "Saulo Rodrigues" <rj.saulo(a)gmail.com>
wrote:

>Hi Dirk
>
>Thanks, I will give a try... btw, are you using something like that?
>
>TIA,
>Saulo
>
>Dirk (Belgium) escreveu:
>
>> Hi,
>>
>> If you have the jpeg in memory, you can do the following.
>>
>> Create a device = hDC
>> Paint the jpeg to this hDC
>> Read the hDC as a bitmap (see VO-SDk window{}:Print()-method)
>> Save the bitmap (see Microsoft SDK)
>>
>> Dirk
>>
>> On 20 Nov 2006 03:46:57 -0800, "Saulo Rodrigues" <rj.saulo(a)gmail.com>
>> wrote:
>>
>> >Hi everybody,
>> >
>> >With FabPaint I can create a jpeg file through a resource bitmap,
>> >however I'd like to make the inverse thing. Any help is welcome.
>> >
>> >TIA,
>> >Saulo

From: Saulo Rodrigues on
Thanks a lot to all you guys!

Like always I got very great solutions here in this NG.

Best Regards to all,
Saulo


Saulo Rodrigues escreveu:

> Hi everybody,
>
> With FabPaint I can create a jpeg file through a resource bitmap,
> however I'd like to make the inverse thing. Any help is welcome.
>
> TIA,
> Saulo

First  |  Prev  | 
Pages: 1 2 3 4
Prev: CRC32
Next: CAVORT20.DLL and 2.7