Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
323ec2c2
Commit
323ec2c2
authored
Nov 18, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix image proxies not correctly applied after recovering proxy, don't attempt to proxy small images
parent
bed54470
Pipeline
#269967
passed with stage
in 6 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/jobs/proxytask.cpp
View file @
323ec2c2
...
...
@@ -196,52 +196,55 @@ void ProxyTask::run()
}
QImage
proxy
;
// Images are scaled to profile size.
// TODO: Make it be configurable?
if
(
i
.
width
()
>
i
.
height
())
{
proxy
=
i
.
scaledToWidth
(
KdenliveSettings
::
proxyimagesize
());
}
else
{
proxy
=
i
.
scaledToHeight
(
KdenliveSettings
::
proxyimagesize
());
}
if
(
exif
>
1
)
{
// Rotate image according to exif data
QImage
processed
;
QTransform
matrix
;
// Images are scaled to predefined size.
int
maxSize
=
qMax
(
i
.
width
(),
i
.
height
());
if
(
KdenliveSettings
::
proxyimagesize
()
<
maxSize
)
{
if
(
i
.
width
()
>
i
.
height
())
{
proxy
=
i
.
scaledToWidth
(
KdenliveSettings
::
proxyimagesize
());
}
else
{
proxy
=
i
.
scaledToHeight
(
KdenliveSettings
::
proxyimagesize
());
}
if
(
exif
>
1
)
{
// Rotate image according to exif data
QImage
processed
;
QTransform
matrix
;
switch
(
exif
)
{
case
2
:
matrix
.
scale
(
-
1
,
1
);
break
;
case
3
:
matrix
.
rotate
(
180
);
break
;
case
4
:
matrix
.
scale
(
1
,
-
1
);
break
;
case
5
:
matrix
.
rotate
(
270
);
matrix
.
scale
(
-
1
,
1
);
break
;
case
6
:
matrix
.
rotate
(
90
);
break
;
case
7
:
matrix
.
rotate
(
90
);
matrix
.
scale
(
-
1
,
1
);
break
;
case
8
:
matrix
.
rotate
(
270
);
break
;
switch
(
exif
)
{
case
2
:
matrix
.
scale
(
-
1
,
1
);
break
;
case
3
:
matrix
.
rotate
(
180
);
break
;
case
4
:
matrix
.
scale
(
1
,
-
1
);
break
;
case
5
:
matrix
.
rotate
(
270
);
matrix
.
scale
(
-
1
,
1
);
break
;
case
6
:
matrix
.
rotate
(
90
);
break
;
case
7
:
matrix
.
rotate
(
90
);
matrix
.
scale
(
-
1
,
1
);
break
;
case
8
:
matrix
.
rotate
(
270
);
break
;
}
processed
=
proxy
.
transformed
(
matrix
);
processed
.
save
(
dest
);
}
else
{
proxy
.
save
(
dest
);
}
processed
=
proxy
.
transformed
(
matrix
);
processed
.
save
(
dest
);
result
=
true
;
}
else
{
proxy
.
save
(
dest
);
// Image is too small to be proxied
m_logDetails
=
i18n
(
"Clip type does not support proxies"
);
result
=
false
;
}
result
=
true
;
m_progress
=
100
;
QMetaObject
::
invokeMethod
(
m_object
,
"updateJobProgress"
);
return
;
}
else
{
m_isFfmpegJob
=
true
;
if
(
!
QFileInfo
(
KdenliveSettings
::
ffmpegpath
()).
isFile
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment