Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-06

CreateGrayScalePalette exception

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Ishenin

Hello, FPC developers' list.

CreateGrayScalePalette raises an exception. The problem is that palette is created with count = 0 and every color assigment increase color count. I dont know why it is done so but as result you cannot assign palette colors from highier indexes to lower. It is not a big problem but CreateGrayScalePalette doesnot follow this rule and raises an exception.

Attached patch fixes CreateGrayScalePalette.

Best regards, Paul Ishenin.

Reply by email

Michael Van Canneyt
to Paul Ishenin
Paul Ishenin wrote 9 lines
Hello, FPC developers' list. CreateGrayScalePalette raises an exception. The problem is that palette is created with count = 0 and every color assigment increase color count. I dont know why it is done so but as result you cannot assign palette colors from highier indexes to lower. It is not a big problem but CreateGrayScalePalette doesnot follow this rule and raises an exception. Attached patch fixes CreateGrayScalePalette.

Applied, thank you.

Michael.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Michael Van Canneyt wrote 15 lines
On Fri, 27 Jun 2008, Paul Ishenin wrote: > Hello, FPC developers' list. > > CreateGrayScalePalette raises an exception. The problem is that palette is > created with count = 0 and every color assigment increase color count. I dont > know why it is done so but as result you cannot assign palette colors from > highier indexes to lower. It is not a big problem but CreateGrayScalePalette > doesnot follow this rule and raises an exception. > > Attached patch fixes CreateGrayScalePalette. Applied, thank you.

Can this be merged to fpc 2.2.3 and the release candidate of fpc 2.2.2?

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 20 lines
Michael Van Canneyt schreef: > > On Fri, 27 Jun 2008, Paul Ishenin wrote: > > > Hello, FPC developers' list. > > > > CreateGrayScalePalette raises an exception. The problem is that palette is > > created with count = 0 and every color assigment increase color count. I > > dont > > know why it is done so but as result you cannot assign palette colors from > > highier indexes to lower. It is not a big problem but > > CreateGrayScalePalette > > doesnot follow this rule and raises an exception. > > > > Attached patch fixes CreateGrayScalePalette. > > Applied, thank you. > Can this be merged to fpc 2.2.3 and the release candidate of fpc 2.2.2?

It can.

Michael.

Reply by email