1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 16:45:53 +00:00
QB64-PE/internal/help/_COPYPALETTE.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

28 lines
1.4 KiB
Plaintext

The {{KW|_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}}
:{{KW|_COPYPALETTE}} [{{Parameter|sourceImageHandle&amp;}}[, {{Parameter|destinationImageHandle&amp;}}]]
{{PageDescription}}
* Palette Intensity settings are '''NOT''' used by 24/32 bit images! '''Only use with 4 or 8 BPP images!'''
* [[_PIXELSIZE]] function returns of 1 indicate that _COPYPALETTE can be used. 4 indicates 24/32 bit!
* If {{Parameter|sourceImageHandle&amp;}} is omitted, it is assumed to be the current read page.
* If {{Parameter|destinationImageHandle&amp;}} is omitted, it is assumed to be the current write page.
* If either of the images specified by {{Parameter|sourceImageHandle&amp;}} or {{Parameter|destinationImageHandle&amp;}} do not use a palette, an [[ERROR Codes|illegal function call]] error is returned.
* If either {{Parameter|sourceImageHandle&amp;}} or {{Parameter|destinationImageHandle&amp;}} 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!
''See Example:'' [[SAVEIMAGE]]
{{PageSeeAlso}}
* {{KW|_LOADIMAGE}}
* {{KW|_PIXELSIZE}}
* {{KW|_PALETTECOLOR}}, {{KW|_PALETTECOLOR (function)}}
* {{KW|PALETTE}}, [[Images]]
{{PageNavigation}}