Class: QgsRasterRendererUtils¶
Utility functions for raster renderers.
Added in version 3.16.
Static Methods
Parses an exported color map file at the specified path and extracts the stored color ramp items and ramp shader type.  | 
|
Exports a list of color ramp items and ramp shader type to a color map file at the specified path.  | 
- class qgis.core.QgsRasterRendererUtils[source]¶
 Bases:
object- static parseColorMapFile(path: str | None)[source]¶
 Parses an exported color map file at the specified
pathand extracts the stored color rampitemsand ramp shadertype.Returns
Trueif the parsing was successful. If not, a list oferrorswill be generated.See also
- Parameters:
 path (Optional[str]) -> (bool)
- static saveColorMapFile(path: str | None, items: Iterable[QgsColorRampShader.ColorRampItem], type: Qgis.ShaderInterpolationMethod) bool[source]¶
 Exports a list of color ramp
itemsand ramp shadertypeto a color map file at the specifiedpath.Returns
Trueif the save was successful.See also
- Parameters:
 path (Optional[str])
items (Iterable[QgsColorRampShader.ColorRampItem])
- Return type:
 bool