_COPYPALETTE - QB64 Wiki

_COPYPALETTE

From QB64 Wiki

Jump to: navigation, search

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.


Syntax:

_COPYPALETTE [sourceImageHandle&[, destinationImageHandle&]]


Description:

  • 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 sourceImageHandle& is omitted, it is assumed to be the current read page.
  • If destinationImageHandle& is omitted, it is assumed to be the current write page.
  • If either of the images specified by sourceImageHandle& or destinationImageHandle& do not use a palette, an illegal function call error is returned.
  • If either sourceImageHandle& or destinationImageHandle& is an invalid handle, an 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


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version