PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Resize Image
Resize Image
Started by adrianoboller, Nov., 24 2014 12:38 PM - No answer
Connect yourself…
adrianoboller
#1
Registered member
3,661 messages
Popularité : +175 (223 votes)
Posted on November, 24 2014 - 12:38 PM
Procedure
CAM_
ResizeImage
(
LOCAL
PathFileOrigemJpg is
string
,
LOCAL
PathFileDestinoJpg
,
LOCAL
Horizontal
,
LOCAL
Vertical
,
LOCAL
DebugSN
)
IF
gs
DebugSN
=
"S"
DebugSN
=
"S"
END
IF
Horizontal
=
""
OR
Horizontal
=
0
OR
Vertical
=
""
OR
Vertical
=
0
THEN
Info
(
"Não foi definido o tamanho Horizontal e Vertical da imagem"
)
ok
=
False
END
IF
PathFileOrigemJpg
<
>
""
AND
PathFileDestinoJpg
<
>
""
HReadSeekFirst
(
T000Config
,
T000Config.CodConfig000
,
27
)
IF
HFound
(
T000Config
) =
True
AND
T000Config.Valor000
<
>
""
THEN
Horizontal
=
Middle
(
T000Config.Valor000
,
1
,
3
)
Vertical
=
Middle
(
T000Config.Valor000
,
5
,
3
)
ok
=
VideoGenerateThumbnail
(
PathFileOrigemJpg
,
PathFileDestinoJpg
,
Horizontal
,
Vertical
)
ELSE
ok
=
VideoGenerateThumbnail
(
PathFileOrigemJpg
,
PathFileDestinoJpg
,
640
,
480
)
END
IF
fFileExist
(
PathFileDestinoJpg
)
THEN
IF
ok
=
True
AND
DebugSN
=
"S"
Info
(
"Redimensionamento realizado com sucesso!"
)
ok
=
True
END
ELSE
IF
DebugSN
=
"S"
Info
(
"Falha no redimensionamento da imagem!"
)
ok
=
False
END
END
ELSE
Info
(
"Nome da imagem não foi definido!..."
)
ok
=
False
END
RESULT
(
ok
)
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text