Difference between revisions of "COPYPALETTE"

From QB64 Wiki
Jump to navigation Jump to search
imported>Stylin
(new page)
 
imported>Clippy
m
Line 3: Line 3:


{{PageSyntax}}
{{PageSyntax}}
:<code>{{KW|_COPYPALETTE}} [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]</code>
:{{KW|_COPYPALETTE}} [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]




Line 10: Line 10:
* If {{Parameter|sourceImageHandle&}} is omitted, it is assumed to be the current read page.
* 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 {{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 thrown.
* 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 thrown.
* If either {{Parameter|sourceImageHandle&}} or {{Parameter|destinationImageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error is returned.
* When loading image files, it is necessary to adopt the color palette of the image or it will not have the correct colors!




{{PageSeeAlso}}
{{PageSeeAlso}}
* {{KW|_LOADIMAGE}}
* {{KW|PALETTE}}
* {{KW|PALETTE}}
* {{KW|_PALETTECOLOR}}, {{KW|_PALETTECOLOR (function)}}
* {{KW|_PALETTECOLOR}}, {{KW|_PALETTECOLOR (function)}}

Revision as of 21:52, 18 September 2010

The _COPYPALETTE statement copies the color palette entries from one image to another.


Syntax

_COPYPALETTE [sourceImageHandle&[, destinationImageHandle&]]


Description

  • The _COPYPALETTE statement copies the color palette entries from sourceImageHandle& to destinationImageHandle&.
  • 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 image files, it is necessary to adopt the color palette of the image or it will not have the correct colors!


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page