Alaska Software Inc. - PNG problem
Username: Password:
AuthorTopic: PNG problem
Slavko SlavicPNG problem
on Wed, 05 Apr 2017 16:06:39 +0200
Hi all!


oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_PNG,0) NOT working
oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_JPG,0) working

Compiler 2.00.554

TIA


slavko_slavic.vcf
Thomas BraunRe: PNG problem
on Thu, 06 Apr 2017 10:33:17 +0200
Slavko Slavic wrote:

> Hi all!
> 
> oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_PNG,0) NOT working
> oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_JPG,0) working

What exactly is the symptom? Not working is not a very precise
description and could anything like:

- program crashes
- saves a file, but the file is not a PNG or can't be opened by other
programs
- saves a file, but the colours or transparency is wrong

you know what I mean?

thomas
Slavko SlavicRe: PNG problem
on Thu, 06 Apr 2017 14:18:42 +0200
Hi Thomas,
thanks for answer!

More:
No crash, no saved file, nothing happens!
(JPG file was created).
Under Compiler 1.90.331 works PNG OK.
See attachments.

Best regards S.


Thomas Braun wrote:
> Slavko Slavic wrote:
>
>> Hi all!
>>
>> oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_PNG,0) NOT working
>> oBitmap:SaveFile(cNamBmp,XBPBMP_FORMAT_JPG,0) working
>
> What exactly is the symptom? Not working is not a very precise
> description and could anything like:
>
> - program crashes
> - saves a file, but the file is not a PNG or can't be opened by other
> programs
> - saves a file, but the colours or transparency is wrong
>
> you know what I mean?
>
> thomas
>


scr1
slavko_slavic.vcf
Andreas Gehrs-Pahl
Re: PNG problem
on Thu, 06 Apr 2017 11:48:37 -0400
Slavko, Thomas,

For more details on this and related (GIF) issues, please see my post from 
02/19/2015 in the public.xbase++.support.en newsgroup, with the subject: 
"Problem saving PNG files on Windows XP".

Till mentioned in that thread that he would create some PDR(s), but I can't 
find any PDRs that cover those particular PNG or GIF issues.

As the PNG issue is limited to Windows XP and 32 bit color bitmaps, it might 
not be important enough to fix in Xbase++. Using a newer OS or saving in the 
JPG format on Windows XP might be a good enough workaround for most users, I 
suppose.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Slavko SlavicRe: PNG problem
on Thu, 06 Apr 2017 18:50:51 +0200
Hi Andreas,
  Windows 7 Enterprise, 64bit, PNG NOK, JPG done.

Regards S


Andreas Gehrs-Pahl wrote:
> Slavko, Thomas,
>
> For more details on this and related (GIF) issues, please see my post from
> 02/19/2015 in the public.xbase++.support.en newsgroup, with the subject:
> "Problem saving PNG files on Windows XP".
>
> Till mentioned in that thread that he would create some PDR(s), but I can't
> find any PDRs that cover those particular PNG or GIF issues.
>
> As the PNG issue is limited to Windows XP and 32 bit color bitmaps, it might
> not be important enough to fix in Xbase++. Using a newer OS or saving in the
> JPG format on Windows XP might be a good enough workaround for most users, I
> suppose.
>
> Hope that helps,
>
> Andreas
>


slavko_slavic.vcf
Jim LeeRe: PNG problem
on Fri, 07 Apr 2017 06:55:16 +0200
hm ... these PDR are open for 1.90.331/1.90.355

PDR 6337 XbpBitmap() fails to write PNG file
If transparency is involved some Bitmaps are not saved properly in the PNG 
file format

PDR 6285 XbpBitmap: alpha channel ignored in PNG images
Loading a .PNG image into an XbpBitmap object using the :LoadFile() or 
:SetBuffer() methods causes alpha channel information to be lost.

Due to this anomaly, transparent areas in the original .PNG image will be 
displayed opaque by XbpBitmap:Draw()

---
The XbpBitmap class currently only supports transparent pixels by 
substituting pixels having a certain color ("color keying") with background 
information. An alpha channel in the original image file
is ignored.

To do this, use the :TransparentClr member variable to define the color of 
the pixels which define transparent areas. Also see the method 
XbpBitmap:GetDefaultBGColor()
---

so it might be closed or brocken again ...
send you Sample to Alaska, perhaps Your PNG is not kompatible ?!