Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
digiKam
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Peter Becker
digiKam
Commits
c97025cb
Commit
c97025cb
authored
May 11, 2020
by
Gilles Caulier
🗼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of invent.kde.org:kde/digikam
parents
8cc20a13
68f89cc6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
22 deletions
+47
-22
core/dplugins/generic/tools/htmlgallery/themes/html5responsive/html5responsive.desktop
...tmlgallery/themes/html5responsive/html5responsive.desktop
+7
-0
core/libs/dimg/dimg.h
core/libs/dimg/dimg.h
+2
-2
core/libs/dimg/dimg_data.cpp
core/libs/dimg/dimg_data.cpp
+11
-1
core/libs/dimg/dimg_props.cpp
core/libs/dimg/dimg_props.cpp
+7
-4
core/libs/dimg/filters/fx/blurfxfilter.cpp
core/libs/dimg/filters/fx/blurfxfilter.cpp
+1
-1
core/libs/dimg/loaders/dimgloader.cpp
core/libs/dimg/loaders/dimgloader.cpp
+1
-1
core/libs/dimg/loaders/dimgloader.h
core/libs/dimg/loaders/dimgloader.h
+5
-5
core/libs/threadimageio/fileio/loadingcache.cpp
core/libs/threadimageio/fileio/loadingcache.cpp
+13
-8
No files found.
core/dplugins/generic/tools/htmlgallery/themes/html5responsive/html5responsive.desktop
View file @
c97025cb
...
...
@@ -9,6 +9,7 @@ Name[et]=Reageeriv HTML5
Name[is]=Skalanlegt HTML5 (responsive)
Name[it]=HTML5 Responsive
Name[nl]=Reageert op HTML5
Name[nn]=HTML5 responsiv
Name[pt]=HTML5 Responsivo
Name[pt_BR]=HTML5 responsivo
Name[sl]=Odzivno na HTML5
...
...
@@ -42,6 +43,7 @@ Name[es]=Bobulous
Name[is]=Bobulous
Name[it]=Bobulous
Name[nl]=Bobulous
Name[nn]=Bobulous
Name[pt]=Bolhas
Name[pt_BR]=Bolhas
Name[sl]=Bobulous
...
...
@@ -61,6 +63,7 @@ Name[et]=Reageeriv HTML5
Name[is]=Skalanlegt HTML5 (responsive)
Name[it]=HTML5 Responsive
Name[nl]=Reageert op HTML5
Name[nn]=HTML5 responsiv
Name[pt]=HTML5 Responsivo
Name[pt_BR]=HTML5 responsivo
Name[sl]=Odzivno na HTML5
...
...
@@ -267,6 +270,7 @@ Name[et]=PhotoSwipe'i kasutamine
Name[is]=Nota PhotoSwipe
Name[it]=Usa PhotoSwipe
Name[nl]=PhotoSwipe gebruiken
Name[nn]=Bruk PhotoSwipe
Name[pt]=Usar o PhotoSwipe
Name[pt_BR]=Usar o PhotoSwipe
Name[sl]=Uporabi PhotoSwipe
...
...
@@ -291,6 +295,7 @@ Name[et]=PhotoSwipe'i tausta läbipaistmatus
Name[is]=Ógegnsæi bakgrunns PhotoSwipe
Name[it]=Opacità sfondo di PhotoSwipe
Name[nl]=Achtergronddekking van PhotoSwipe
Name[nn]=Gjennomsikt til bakgrunn for PhotoSwipe
Name[pt]=Opacidade do Fundo do PhotoSwipe
Name[pt_BR]=Opacidade do plano de fundo do PhotoSwipe
Name[sl]=Neprosojnost ozadja v PhotoSwipe
...
...
@@ -313,6 +318,7 @@ Name[et]=PhotoSwipe'i jagamisnupp
Name[is]=Deilingarhnappur PhotoSwipe
Name[it]=Pulsante di condivisione PhotoSwipe
Name[nl]=Delenknop van PhotoSwipe
Name[nn]=Deleknapp for PhotoSwipe
Name[pt]=Botão de partilha do PhotoSwipe
Name[pt_BR]=Botão de compartilhamento do PhotoSwipe
Name[sl]=Gumb za skupno rabo PhotoSwipe
...
...
@@ -360,6 +366,7 @@ Name[et]=GPS-andmete näitamine
Name[is]=Birta GPS-gögn
Name[it]=Mostra dati GPS
Name[nl]=GPS gegevens tonen
Name[nn]=Vis GPS-data
Name[pt]=Mostrar os dados de GPS
Name[pt_BR]=Mostrar dados de GPS
Name[sl]=Prikaži podatke GPS
...
...
core/libs/dimg/dimg.h
View file @
c97025cb
...
...
@@ -257,8 +257,8 @@ public:
uchar
*
scanLine
(
uint
i
)
const
;
bool
hasAlpha
()
const
;
bool
sixteenBit
()
const
;
uint
numBytes
()
const
;
uint
numPixels
()
const
;
quint64
numBytes
()
const
;
quint64
numPixels
()
const
;
/**
* Return the number of bytes depth of one pixel : 4 (non sixteenBit) or 8 (sixteen)
...
...
core/libs/dimg/dimg_data.cpp
View file @
c97025cb
...
...
@@ -166,7 +166,17 @@ void DImg::copyImageData(const QExplicitlySharedDataPointer<Private>& src)
size_t
DImg
::
allocateData
()
const
{
size_t
size
=
m_priv
->
width
*
m_priv
->
height
*
(
m_priv
->
sixteenBit
?
8
:
4
);
quint64
size
=
(
quint64
)
m_priv
->
width
*
(
quint64
)
m_priv
->
height
*
(
quint64
)(
m_priv
->
sixteenBit
?
8
:
4
);
if
(
size
>
(
quint64
)
std
::
numeric_limits
<
size_t
>::
max
())
{
m_priv
->
null
=
true
;
return
0
;
}
m_priv
->
data
=
DImgLoader
::
new_failureTolerant
(
size
);
if
(
!
m_priv
->
data
)
...
...
core/libs/dimg/dimg_props.cpp
View file @
c97025cb
...
...
@@ -182,14 +182,17 @@ void DImg::setMetadata(const MetaEngineData& data)
m_priv
->
metaData
=
data
;
}
uint
DImg
::
numBytes
()
const
quint64
DImg
::
numBytes
()
const
{
return
(
width
()
*
height
()
*
bytesDepth
());
return
((
quint64
)
width
()
*
(
quint64
)
height
()
*
(
quint64
)
bytesDepth
());
}
uint
DImg
::
numPixels
()
const
quint64
DImg
::
numPixels
()
const
{
return
(
width
()
*
height
());
return
((
quint64
)
width
()
*
(
quint64
)
height
());
}
int
DImg
::
bytesDepth
()
const
...
...
core/libs/dimg/filters/fx/blurfxfilter.cpp
View file @
c97025cb
...
...
@@ -876,7 +876,7 @@ void BlurFXFilter::shakeBlur(DImg* const orgImage, DImg* const destImage, int Di
{
int
progress
;
int
numBytes
=
orgImage
->
numBytes
();
quint64
numBytes
=
orgImage
->
numBytes
();
QScopedArrayPointer
<
uchar
>
layer1
(
new
uchar
[
numBytes
]);
QScopedArrayPointer
<
uchar
>
layer2
(
new
uchar
[
numBytes
]);
QScopedArrayPointer
<
uchar
>
layer3
(
new
uchar
[
numBytes
]);
...
...
core/libs/dimg/loaders/dimgloader.cpp
View file @
c97025cb
...
...
@@ -83,7 +83,7 @@ unsigned char*& DImgLoader::imageData()
return
m_image
->
m_priv
->
data
;
}
unsigned
int
DImgLoader
::
imageNumBytes
()
const
quint64
DImgLoader
::
imageNumBytes
()
const
{
return
m_image
->
numBytes
();
}
...
...
core/libs/dimg/loaders/dimgloader.h
View file @
c97025cb
...
...
@@ -103,7 +103,7 @@ public:
static
qint64
checkAllocation
(
qint64
fullSize
);
template
<
typename
Type
>
static
Type
*
new_failureTolerant
(
size_t
unsecureSize
);
template
<
typename
Type
>
static
Type
*
new_failureTolerant
(
quint64
w
,
quint64
h
,
uint
typesPerPixel
);
template
<
typename
Type
>
static
Type
*
new_failureTolerant
(
uint
w
,
uint
h
,
uint
typesPerPixel
);
protected:
...
...
@@ -116,7 +116,7 @@ protected:
bool
imageHasAlpha
()
const
;
bool
imageSixteenBit
()
const
;
unsigned
int
imageNumBytes
()
const
;
quint64
imageNumBytes
()
const
;
int
imageBitsDepth
()
const
;
int
imageBytesDepth
()
const
;
...
...
@@ -156,14 +156,14 @@ private:
* 32bit overflow and exceeding the size_t type
*/
template
<
typename
Type
>
Q_INLINE_TEMPLATE
Type
*
DImgLoader
::
new_failureTolerant
(
quint64
w
,
quint64
h
,
uint
typesPerPixel
)
Q_INLINE_TEMPLATE
Type
*
DImgLoader
::
new_failureTolerant
(
uint
w
,
uint
h
,
uint
typesPerPixel
)
{
quint64
requested
=
w
*
h
*
quint64
(
typesPerPixel
)
;
quint64
requested
=
(
quint64
)
w
*
(
quint64
)
h
*
(
quint64
)
typesPerPixel
;
quint64
maximum
=
std
::
numeric_limits
<
size_t
>::
max
();
if
(
requested
>
maximum
)
{
qCCritical
(
DIGIKAM_DIMG_LOG
)
<<
"Requested memory of"
<<
requested
*
quint64
(
sizeof
(
Type
))
qCCritical
(
DIGIKAM_DIMG_LOG
)
<<
"Requested memory of"
<<
requested
*
quint64
(
sizeof
(
Type
))
<<
"is larger than size_t supported by platform."
;
return
nullptr
;
}
...
...
core/libs/threadimageio/fileio/loadingcache.cpp
View file @
c97025cb
...
...
@@ -197,16 +197,21 @@ DImg* LoadingCache::retrieveImage(const QString& cacheKey) const
bool
LoadingCache
::
putImage
(
const
QString
&
cacheKey
,
const
DImg
&
img
,
const
QString
&
filePath
)
const
{
int
cost
=
img
.
numBytes
();
bool
successfulyInserted
=
d
->
imageCache
.
insert
(
cacheKey
,
new
DImg
(
img
),
cost
);
bool
isInserted
=
false
;
if
(
successfulyInserted
&&
!
filePath
.
isEmpty
(
))
if
(
isCacheable
(
img
))
{
d
->
mapImageFilePath
(
filePath
,
cacheKey
);
d
->
fileWatch
()
->
addedImage
(
filePath
);
int
cost
=
img
.
numBytes
()
/
1024
;
isInserted
=
d
->
imageCache
.
insert
(
cacheKey
,
new
DImg
(
img
),
cost
);
if
(
isInserted
&&
!
filePath
.
isEmpty
())
{
d
->
mapImageFilePath
(
filePath
,
cacheKey
);
d
->
fileWatch
()
->
addedImage
(
filePath
);
}
}
return
successfuly
Inserted
;
return
is
Inserted
;
}
void
LoadingCache
::
removeImage
(
const
QString
&
cacheKey
)
...
...
@@ -223,7 +228,7 @@ bool LoadingCache::isCacheable(const DImg& img) const
{
// return whether image fits in cache
return
(
uint
)
d
->
imageCache
.
maxCost
()
>=
img
.
numBytes
(
);
return
(
quint64
)
d
->
imageCache
.
maxCost
()
>=
(
img
.
numBytes
()
/
1024
);
}
void
LoadingCache
::
addLoadingProcess
(
LoadingProcess
*
const
process
)
...
...
@@ -253,7 +258,7 @@ void LoadingCache::notifyNewLoadingProcess(LoadingProcess* const process, const
void
LoadingCache
::
setCacheSize
(
int
megabytes
)
{
qCDebug
(
DIGIKAM_GENERAL_LOG
)
<<
"Allowing a cache size of"
<<
megabytes
<<
"MB"
;
d
->
imageCache
.
setMaxCost
(
megabytes
*
1024
*
1024
);
d
->
imageCache
.
setMaxCost
(
megabytes
*
1024
);
}
// --- Thumbnails ----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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