I do not know if it's a bug or my mistake.
My program :
------------------------------------------------
UseJPEGImageDecoder()
GImage$ = "Dscn2727_recadre.jpg"
; GImage$ = "_affiche2721.jpg"
If LoadImage(0, GImage$) = 0
GLiberr$ = "Error reading " + GImage$
Else
imagebmp$ = "Wallpaperjc_tmp.bmp"
If SaveImage(0, imagebmp$, #PB_ImagePlugin_BMP) = 0
GLiberr$ = "Error writing from " + GImage$ + " to " + imagebmp$
Else
MessageRequester("","Good",0)
EndIf
EndIf
If GLiberr$ <> ""
MessageRequester("",GLiberr$,0)
EndIf
End
-------------------------------------------------
Generally, it works fine. But sometimes, a JPEG file makes the Saveimage fail. About 5 or 10 %.
These JPEG files are all made with a CoolPix 990, then worked with Ulead PhotoImpact 3.01, with "JPEG SmartSaver".
I select 2 cases : Dscn2727_recadre.jpg (saveimage fails) and _affiche2721.jpg (no problem).
You can find these pictures and the code at :
http://pg.ctjean.com/testpb/
Desactivate Debugger before F5. Sometimes, it halts.
Thanks if you find an explanation.
Jean.
[img]Converting JPG to BMP fails with some JPG.[/img]
Did you try the library from http://www.purebasic.com/beta/?[/url]
You are right.
It is a question of dimension.
I change from 1021 x 766 to 1024 x 768, and it works fine.
The same with 800 x 600.
Is it a bug of saveimage?
I ask this question to know if I try an other solution or if I wait for the correction.
Does the El Choni's beta library solve this problem?
Thanks a lot.
Jean.
It is a question of dimension.
I change from 1021 x 766 to 1024 x 768, and it works fine.
The same with 800 x 600.
Is it a bug of saveimage?
I ask this question to know if I try an other solution or if I wait for the correction.
Does the El Choni's beta library solve this problem?
Thanks a lot.
Jean.
I had trouble with SaveImage() to a BMP yesterday. I found that the bitmap header was saved but not the bitmap.
Unfortunately, when I tried to simplify the code to report a bug, the bug went away, so this may have been a bug in my program. I doubt this helps much.
Fred, do you know if the quality of loaded JPG images can be improved?
This has been asked elsewhere, but as things stand there seems no point developing software to load photographic quality images.
Unfortunately, when I tried to simplify the code to report a bug, the bug went away, so this may have been a bug in my program. I doubt this helps much.

Fred, do you know if the quality of loaded JPG images can be improved?
This has been asked elsewhere, but as things stand there seems no point developing software to load photographic quality images.
-
- User
- Posts: 10
- Joined: Fri Apr 25, 2003 8:23 pm