forked from lmbelo/python4delphi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit1.dfm
More file actions
120 lines (118 loc) · 2.68 KB
/
Unit1.dfm
File metadata and controls
120 lines (118 loc) · 2.68 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
object Form1: TForm1
Left = 218
Top = 18
Caption = 'Form1'
ClientHeight = 809
ClientWidth = 668
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Image1: TImage
Left = 8
Top = 8
Width = 657
Height = 289
AutoSize = True
end
object Button1: TButton
Left = 8
Top = 312
Width = 97
Height = 25
Caption = 'Open Picture...'
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 196
Top = 312
Width = 105
Height = 25
Caption = 'Execute'
TabOrder = 1
OnClick = Button2Click
end
object Memo1: TMemo
Left = 8
Top = 471
Width = 657
Height = 330
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Consolas'
Font.Style = []
Lines.Strings = (
'# This demo requires the module pillow (PIL)'
'# You can use "pip install Pillow" from a command prompt to ins' +
'tall Pillow'
''
'from io import BytesIO'
'from PIL import Image'
'import sys'
''
'def ProcessImage(data):'
' print(sys.version)'
' stream = BytesIO(data)'
' im = Image.open(stream)'
' print ("Processing image %s of %d bytes" % (im.format, len(dat' +
'a)))'
' new_im = im.rotate(90, expand=True)'
' new_im.format = im.format'
' return new_im'
' '
'def ImageToString(image):'
' stream = BytesIO()'
' image.save(stream, image.format)'
' return stream.getvalue()')
ParentFont = False
ScrollBars = ssBoth
TabOrder = 2
WordWrap = False
end
object Memo2: TMemo
Left = 8
Top = 352
Width = 657
Height = 113
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Consolas'
Font.Style = []
ParentFont = False
ScrollBars = ssBoth
TabOrder = 3
end
object chkUseDC: TCheckBox
Left = 336
Top = 316
Width = 193
Height = 17
Caption = 'Use Device Context'
TabOrder = 4
end
object OpenPictureDialog1: TOpenPictureDialog
Left = 104
Top = 336
end
object PythonEngine1: TPythonEngine
AutoUnload = False
IO = PythonGUIInputOutput1
Left = 168
Top = 624
end
object PythonGUIInputOutput1: TPythonGUIInputOutput
UnicodeIO = True
RawOutput = False
Output = Memo2
Left = 208
Top = 624
end
end