Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7856 > unrolled thread
| Started by | Joe Bench <zweitaktfan@gmail.com> |
|---|---|
| First post | 2015-03-11 07:29 -0700 |
| Last post | 2015-03-18 00:38 -0700 |
| Articles | 8 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Showing JPG bigger than 600kB Joe Bench <zweitaktfan@gmail.com> - 2015-03-11 07:29 -0700
Re: Showing JPG bigger than 600kB "Wolfgang Riedmann" <wriedmann@gmail.com> - 2015-03-11 16:50 +0100
Re: Showing JPG bigger than 600kB Joe Bench <zweitaktfan@gmail.com> - 2015-03-13 00:20 -0700
Re: Showing JPG bigger than 600kB "Wolfgang Riedmann" <wriedmann@gmail.com> - 2015-03-13 10:27 +0100
Re: Showing JPG bigger than 600kB Mathias <mathias.hakansson@consultec.se> - 2015-03-13 03:30 -0700
Re: Showing JPG bigger than 600kB Joe Bench <zweitaktfan@gmail.com> - 2015-03-13 04:58 -0700
Re: Showing JPG bigger than 600kB Mathias <mathias.hakansson@consultec.se> - 2015-03-16 05:18 -0700
Re: Showing JPG bigger than 600kB Joe Bench <zweitaktfan@gmail.com> - 2015-03-18 00:38 -0700
| From | Joe Bench <zweitaktfan@gmail.com> |
|---|---|
| Date | 2015-03-11 07:29 -0700 |
| Subject | Showing JPG bigger than 600kB |
| Message-ID | <64839073-15b5-4c86-82d6-e05b03c61cbb@googlegroups.com> |
Hi there,
i got an old project (VO27b) to fix.
JPG files should be loaded, shown in a fixed bitmap
and stored in database.
Maybe an old library? If yes, please tell me where i can get some fixed/new
stuff.
hf := FOpen(sFilename)
IF hf != F_ERROR
nSize := FSeek(hf, 0, FS_END)
FSeek(hf, 0, FS_SET)
pDib := MemAlloc(nSize)
IF FRead3(hf, pDib, nSize) <> nSize
MessageBox(0, String2Psz(DosErrString(FError())), String2Psz("ERROR "), MB_ICONSTOP)
FClose(hf)
MemFree(pDib)
RETURN NIL
ENDIF
pBitMap := DIBCreateFromPTR(pDib,nSize)
FClose(hf)
IF pBitMap == NULL_PTR
MessageBox(0, String2Psz("Error reading image"), String2Psz("ERROR "), MB_ICONSTOP)
MemFree(pDib)
RETURN NIL
ENDIF
Program rans always into "Error reading image" when i try to open a bigger JPG than 600kB.
Please help!
Thx,
Joe
[toc] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2015-03-11 16:50 +0100 |
| Message-ID | <cmb6ioFd9piU1@mid.individual.net> |
| In reply to | #7856 |
Hi Joe,
this is caused by the (now very outdated) CAPaint.dll.
You could try to find a FabPaint lib as drop-in replacement, go to
fabtoys.net.
Best thing would be to upgrade to VO 2.8 SP4.
Wolfgang
> i got an old project (VO27b) to fix.
> JPG files should be loaded, shown in a fixed bitmap
> and stored in database.
> Maybe an old library? If yes, please tell me where i can get some
> fixed/new stuff.
>
> hf := FOpen(sFilename)
> IF hf != F_ERROR
> nSize := FSeek(hf, 0, FS_END)
> FSeek(hf, 0, FS_SET)
> pDib := MemAlloc(nSize)
> IF FRead3(hf, pDib, nSize) <> nSize
> MessageBox(0, String2Psz(DosErrString(FError())),
> String2Psz("ERROR "), MB_ICONSTOP) FClose(hf)
> MemFree(pDib)
> RETURN NIL
> ENDIF
>
> pBitMap := DIBCreateFromPTR(pDib,nSize)
> FClose(hf)
> IF pBitMap == NULL_PTR
> MessageBox(0, String2Psz("Error reading image"), String2Psz("ERROR
> "), MB_ICONSTOP) MemFree(pDib)
> RETURN NIL
> ENDIF
>
> Program rans always into "Error reading image" when i try to open a
> bigger JPG than 600kB.
>
> Please help!
> Thx,
> Joe
--
[toc] | [prev] | [next] | [standalone]
| From | Joe Bench <zweitaktfan@gmail.com> |
|---|---|
| Date | 2015-03-13 00:20 -0700 |
| Message-ID | <4d1bced2-9c27-45f1-b650-9ca95af4140d@googlegroups.com> |
| In reply to | #7858 |
Hi! Thanks for your response. This is from CAPaint: > > pBitMap := DIBCreateFromPTR(pDib,nSize) How can i use/reference the classes from Fabtoys? I referenced FabPaintLib in my application, but have no idea to use these wrappers ;-(. thx, Joe
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2015-03-13 10:27 +0100 |
| Message-ID | <cmfornFimrkU1@mid.individual.net> |
| In reply to | #7862 |
Hi Joe, > Thanks for your response. > This is from CAPaint: > > > pBitMap := DIBCreateFromPTR(pDib,nSize) > > How can i use/reference the classes from Fabtoys? > I referenced FabPaintLib in my application, but have no idea to use > these wrappers ;-(. there should be a notice about this in the FabPaint code, and if I remember correctly, you have to add FabPaintLib to your application before any other VO library - or you could use the relative function directly from FabPaint. AFAIK the FabPaint version also opens PNG files. Wolfgang --
[toc] | [prev] | [next] | [standalone]
| From | Mathias <mathias.hakansson@consultec.se> |
|---|---|
| Date | 2015-03-13 03:30 -0700 |
| Message-ID | <a2c1331d-75aa-4b06-9289-9db91f3f282c@googlegroups.com> |
| In reply to | #7862 |
Hi Joe,
I'm using the FabPaintLibCtrl. I get my image directly from a memo field and display it with the following code (after making sure that the string is not empty).
pBuf := StringAlloc(s)
self:oDCFabImage:Image := FabPaintlib{,self}
self:oDCFabImage:Image:CreateFromPtr(pBuf,int(SLen(s)))
self:oDCFabImage:ImageFit := true
MemFree(pBuf)
/Mathias
Den fredag 13 mars 2015 kl. 08:20:29 UTC+1 skrev Joe Bench:
> Hi!
> Thanks for your response.
> This is from CAPaint:
> > > pBitMap := DIBCreateFromPTR(pDib,nSize)
>
> How can i use/reference the classes from Fabtoys?
> I referenced FabPaintLib in my application, but have no idea to use these
> wrappers ;-(.
>
> thx,
> Joe
[toc] | [prev] | [next] | [standalone]
| From | Joe Bench <zweitaktfan@gmail.com> |
|---|---|
| Date | 2015-03-13 04:58 -0700 |
| Message-ID | <9723ae1e-c01e-4830-8ebc-b9edb0cbdc79@googlegroups.com> |
| In reply to | #7864 |
Hi Matthias!
Am Freitag, 13. März 2015 11:30:03 UTC+1 schrieb Mathias:
> Hi Joe,
>
> I'm using the FabPaintLibCtrl. I get my image directly from a memo field and display it with the following code (after making sure that the string is not empty).
>
> pBuf := StringAlloc(s)
> self:oDCFabImage:Image := FabPaintlib{,self}
> self:oDCFabImage:Image:CreateFromPtr(pBuf,int(SLen(s)))
> self:oDCFabImage:ImageFit := true
> MemFree(pBuf)
>
> /Mathias
Looks great, thx! An how did you create this control? It is not in the Window-Editor...
thx,
Joe
[toc] | [prev] | [next] | [standalone]
| From | Mathias <mathias.hakansson@consultec.se> |
|---|---|
| Date | 2015-03-16 05:18 -0700 |
| Message-ID | <66b42e7e-c8c6-4a69-b113-e7e4321b7709@googlegroups.com> |
| In reply to | #7856 |
I Added a Custom Control ("CC" inside a Square" icon) and inherited from FabPaintLibCtrl.
/Mathias
Den onsdag 11 mars 2015 kl. 15:30:00 UTC+1 skrev Joe Bench:
> Hi there,
>
> i got an old project (VO27b) to fix.
> JPG files should be loaded, shown in a fixed bitmap
> and stored in database.
> Maybe an old library? If yes, please tell me where i can get some fixed/new
> stuff.
>
> hf := FOpen(sFilename)
> IF hf != F_ERROR
> nSize := FSeek(hf, 0, FS_END)
> FSeek(hf, 0, FS_SET)
> pDib := MemAlloc(nSize)
> IF FRead3(hf, pDib, nSize) <> nSize
> MessageBox(0, String2Psz(DosErrString(FError())), String2Psz("ERROR "), MB_ICONSTOP)
> FClose(hf)
> MemFree(pDib)
> RETURN NIL
> ENDIF
>
> pBitMap := DIBCreateFromPTR(pDib,nSize)
> FClose(hf)
> IF pBitMap == NULL_PTR
> MessageBox(0, String2Psz("Error reading image"), String2Psz("ERROR "), MB_ICONSTOP)
> MemFree(pDib)
> RETURN NIL
> ENDIF
>
> Program rans always into "Error reading image" when i try to open a bigger JPG than 600kB.
>
> Please help!
> Thx,
> Joe
[toc] | [prev] | [next] | [standalone]
| From | Joe Bench <zweitaktfan@gmail.com> |
|---|---|
| Date | 2015-03-18 00:38 -0700 |
| Message-ID | <74e1fbfc-f1b0-4cee-a52c-4f43c8470e6b@googlegroups.com> |
| In reply to | #7867 |
Hi! Works great! Thanks a lot! Joe
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web