PyMuPDF 1.24.2 Documentationdoc[0] # Add an area to redact rect = [0,0,200,200] # Add a redacction annotation which will have a red fill color page.add_redact_annot(rect, fill=(1,0,0)) # Apply the redactions to the current page, but 2\nLine 3" text3 = "rotate=-90\nLine 2\nLine 3" text4 = "rotate=180\nLine 2\nLine 3" red = (1, 0, 0) # the color for the red dots # the insertion points, each with a 25 pix distance from the corners p1 = fitz the insertion points as red, filled dots shape.draw_circle(p1,1) shape.draw_circle(p2,1) shape.draw_circle(p3,1) shape.draw_circle(p4,1) shape.finish(width=0.3, color=red, fill=red) # insert the text strings0 码力 | 565 页 | 6.84 MB | 1 年前3
 PyMuPDF 1.12.2 documentationdetermine the colorspaces used: 1 = GRAY, 3 = RGB, 4 = CMYK. So [1.0, 0.0, 0.0] stands for RGB and color red. Both lists can be [] if not specified. The dictionary will be empty {} if no PDF. The value of each color specified as a triple of floats in range 0 to 1. E.g. specify black (default) as (0, 0, 0), red as (1, 0, 0), some gray value as (0.5, 0.5, 0.5), etc. Return type: int Returns: number of text lines tintWith(red, green, blue) Colorize (tint) a pixmap with a color provided as a value triple (red, green, blue). Only colorspaces CS_GRAY and CS_RGB are supported. If the colorspace is CS_GRAY, (red + green0 码力 | 387 页 | 2.70 MB | 1 年前3
 MuPDF 1.23.0 DocumentationThe black and white colors are represented as a packed RGB integer. 0xFFFFFF is white, 0xFF0000 is red, and 0x000000 is black. void fz_gamma_pixmap(fz_context *ctx, fz_pixmap *pix, float gamma); Apply full magenta color would therefore be [0,1,0,0]. • In the DeviceRGB color space a color would be [Red,Green,Blue]. A full green color would therefore be [0,1,0]. • In the DeviceGray color space a color • y – Y co-ordinate. • index – Component index. i.e. For CMYK ColorSpaces 0 = Cyan, for RGB 0 = Red etc. Returns Int. var sample = pixmap.getSample(0,0,0); saveAsPNG(fileName) Save the Pixmap as0 码力 | 245 页 | 817.74 KB | 8 月前3
 MuPDF 1.25.0 DocumentationThe black and white colors are represented as a packed RGB integer. 0xFFFFFF is white, 0xFF0000 is red, and 0x000000 is black. void fz_gamma_pixmap(fz_context *ctx, fz_pixmap *pix, float gamma); Apply full magenta color would therefore be [0,1,0,0]. • In the DeviceRGB color space a color would be [Red,Green,Blue]. A full green color would therefore be [0,1,0]. • In the DeviceGray color space a color • y – Y co-ordinate. • index – Component index. i.e. For CMYK ColorSpaces 0 = Cyan, for RGB 0 = Red etc. Returns Int. var sample = pixmap.getSample(0,0,0); saveAsPNG(fileName) Save the Pixmap as0 码力 | 259 页 | 1.11 MB | 8 月前3
 MuPDF 1.24.0 DocumentationThe black and white colors are represented as a packed RGB integer. 0xFFFFFF is white, 0xFF0000 is red, and 0x000000 is black. void fz_gamma_pixmap(fz_context *ctx, fz_pixmap *pix, float gamma); Apply full magenta color would therefore be [0,1,0,0]. • In the DeviceRGB color space a color would be [Red,Green,Blue]. A full green color would therefore be [0,1,0]. • In the DeviceGray color space a color • y – Y co-ordinate. • index – Component index. i.e. For CMYK ColorSpaces 0 = Cyan, for RGB 0 = Red etc. Returns Int. var sample = pixmap.getSample(0,0,0); saveAsPNG(fileName) Save the Pixmap as0 码力 | 249 页 | 830.15 KB | 8 月前3
 MuPDF 1.22.0 Documentationfull magenta color would therefore be [0,1,0,0]. • In the DeviceRGB color space a color would be [Red,Green,Blue]. A full green color would therefore be [0,1,0]. • In the DeviceGray color space a color The black and white colors are represented as a packed RGB integer. 0xFFFFFF is white, 0xFF0000 is red, and 0x000000 is black. void fz_gamma_pixmap(fz_context *ctx, fz_pixmap *pix, float gamma); Apply0 码力 | 175 页 | 698.87 KB | 8 月前3
共 6 条
- 1
 













