ImagePlacement
ImagePlacement
ภาพรวม
ImagePlacement เป็นคลาสใน Aspose.PDF FOSS สำหรับ Python.
แทนภาพที่วางบนหน้า PDF.
คลาสนี้ให้ 4 เมธอดสำหรับทำงานกับวัตถุ ImagePlacement ในโปรแกรม Python. เมธอดที่มีรวมถึง: __init__, hide, replace, save. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้โดยแอปพลิเคชัน Python ใด ๆ หลังจากติดตั้งแพ็คเกจ Aspose.PDF FOSS สำหรับ Python. คุณสมบัติ: bits_per_component, color_space, height, image_data, matrix, name, และอีก 5 รายการ.
คุณสมบัติ
| ชื่อ | ประเภท | การเข้าถึง | คำอธิบาย |
|---|---|---|---|
image_data | bytes | อ่าน | ส่งคืน payload ของภาพปัจจุบัน. |
rectangle | Rectangle | อ่าน | สี่เหลี่ยมขอบของภาพบนหน้า (x, y, ความกว้าง, ความสูงเป็นหน่วยจุด PDF). |
resolution | tuple[float, float] | อ่าน | ความละเอียดของภาพเป็น (horizontal_dpi, vertical_dpi). |
rotation | int | อ่าน | มุมการหมุนเป็นองศา (0, 90, 180, 270). |
matrix | tuple[float, float, float, float, float, float] | อ่าน | เมทริกซ์การแปลงของ PDF (a, b, c, d, e, f). |
width | `int | None` | อ่าน |
height | `int | None` | อ่าน |
bits_per_component | `int | None` | อ่าน |
color_space | `str | None` | อ่าน |
name | `` | อ่าน | รับชื่อ. |
page_index | `` | อ่าน | รับดัชนีหน้า. |
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
| `init(name: str, image_data: bytes | bytearray, page_index: int, rect: Rectangle |
| `replace(new_image_data: bytes | bytearray)` |
| `save(path: str | os.PathLike, color_space: str |
hide() | ซ่อนตำแหน่งภาพ. |