File: scripterapi-ImageExport.html

package info (click to toggle)
scribus-doc 1.5.6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 59,640 kB
  • sloc: xml: 767; python: 157; makefile: 14
file content (65 lines) | stat: -rw-r--r-- 2,416 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>Python: class ImageExport</title>
</head>
<body>
<h2>Python: class ImageExport</h2>
<p>
<a name="ImageExport">class <strong>ImageExport</strong></a>(object)
</p>
<hr />

<h2>Image export</h2>
<p>Class ImageExport() provides the bitmap graphics exporting for Python scripting as you know it from Export/Save as Image menu. See related class PDFfile() and procedure savePageAsEPS().</p>
<p>Example:<br/>
<code>
i = ImageExport()<br/>
i.type = 'PNG' # select one from i.allTypes list<br/>
i.scale = 200 # I want to have 200%<br/>
i.name = '/home/subik/test.png'<br/>
i.save()<br/>
</p>
<p>Last two lines should be replaced with: <code>i.saveAs('/home/subik/test.png')</code></p>

<h3>Methods defined here</h3>

<dl>
	<dt><strong>__init__(...)</strong></strong></dt>
	<dd><p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p></dd>

	<dt><strong>save(...)</strong></dt>
	<dd>save() -> boolean
	<p>Saves image under previously set 'name'.</p></dd>

	<dt><strong>saveAs(...)</strong></dt>
	<dd>saveAs('filename') -> boolean
	<p>Saves image as 'filename'.</p></dd>
</dl>

<h3>Data and other attributes defined here</h3>

<dl>
	<dt><strong>__new__ = &lt;built-in method __new__ of type object&gt;</strong></dt>
	<dd><p>T.__new__(S, ...) -> a new object with type S, a subtype of T</p></dd>

	<dt><strong>allTypes = &lt;attribute 'allTypes' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>Available types. Read only list of strings.</p></dd>

	<dt><strong>dpi = &lt;member 'dpi' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>This value will be used for export as DPI. Read/write integer.</p></dd>

	<dt><strong>name = &lt;attribute 'name' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>Filename of the image. With or without path. Read/write string.</p></dd>

	<dt><strong>quality = &lt;member 'quality' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>Quality/compression: minimum 1 (poor), maximum 100 (qaulity). Read/write integer.</p></dd>

	<dt><strong>scale = &lt;member 'scale' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>This is the scaling of the image. 100 = 100% etc. Read/write iteger.</p></dd>

	<dt><strong>type = &lt;attribute 'type' of 'ImageExport' objects&gt;</strong></dt>
	<dd><p>Bitmap type. See allTypes list for more info. Read/write string.</p></dd>

</body>
</html>