1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00
QB64-PE/internal/help/_COPYPALETTE.txt
SteveMcNeill 33adc04fc4 Add temp folder to repo. It's necessary as well!
Just more initial setting on... nothing much to see here.
2022-04-28 13:39:56 -04:00

32 lines
1.4 KiB
Plaintext

{{DISPLAYTITLE:_COPYPALETTE}}
The [[_COPYPALETTE]] statement copies the color palette intensities from one 4 or 8 BPP image to another image or a [[_NEWIMAGE]] screen page using 256 or less colors.
{{PageSyntax}}
:[[_COPYPALETTE]] [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]
{{PageDescription}}
* Palette Intensity settings are '''not''' used by 24/32 bit images. Use only with 4 or 8 BPP images.
* [[_PIXELSIZE]] function returns 1 to indicate that _COPYPALETTE can be used. 4 indicates 24/32 bit images.
* If {{Parameter|sourceImageHandle&}} is omitted, it is assumed to be the current read page.
* If {{Parameter|destinationImageHandle&}} is omitted, it is assumed to be the current write page.
* If either of the images specified by {{Parameter|sourceImageHandle&}} or {{Parameter|destinationImageHandle&}} do not use a palette, an [[ERROR Codes|illegal function call]] error is returned.
* If either {{Parameter|sourceImageHandle&}} or {{Parameter|destinationImageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error is returned.
* When loading 4 or 8 BPP image files, it is necessary to adopt the color palette of the image or it may not have the correct colors!
{{PageExamples}}
* See the example in [[SAVEIMAGE]].
{{PageSeeAlso}}
* [[_LOADIMAGE]]
* [[_PIXELSIZE]]
* [[_PALETTECOLOR]], [[_PALETTECOLOR (function)]]
* [[PALETTE]], [[Images]]
{{PageNavigation}}
<