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
Khanat code
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
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tycho Brahe
Khanat code
Commits
169ab7d9
Commit
169ab7d9
authored
Jan 10, 2017
by
Nimetu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge with develop
parent
f8b7db0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
+41
-11
code/nel/src/gui/group_html.cpp
code/nel/src/gui/group_html.cpp
+40
-10
code/nel/src/misc/bitmap_gif.cpp
code/nel/src/misc/bitmap_gif.cpp
+1
-1
No files found.
code/nel/src/gui/group_html.cpp
View file @
169ab7d9
...
...
@@ -588,11 +588,25 @@ namespace NLGUI
// second instance deletes first tmpfile and creates new file for itself.
if
(
CFile
::
getFileSize
(
tmpfile
)
>
0
)
{
CFile
::
moveFile
(
it
->
dest
,
tmpfile
);
for
(
uint
i
=
0
;
i
<
it
->
imgs
.
size
();
i
++
)
try
{
setImage
(
it
->
imgs
[
i
].
Image
,
it
->
dest
);
setImageSize
(
it
->
imgs
[
i
].
Image
,
it
->
imgs
[
i
].
Style
);
// verify that image is not corrupted
uint32
w
,
h
;
CBitmap
::
loadSize
(
tmpfile
,
w
,
h
);
if
(
w
!=
0
&&
h
!=
0
)
{
CFile
::
moveFile
(
it
->
dest
,
tmpfile
);
for
(
uint
i
=
0
;
i
<
it
->
imgs
.
size
();
i
++
)
{
setImage
(
it
->
imgs
[
i
].
Image
,
it
->
dest
);
setImageSize
(
it
->
imgs
[
i
].
Image
,
it
->
imgs
[
i
].
Style
);
}
}
}
catch
(
const
NLMISC
::
Exception
&
e
)
{
// exception message has .tmp file name, so keep it for further analysis
nlwarning
(
"Invalid image (%s): %s"
,
it
->
url
.
c_str
(),
e
.
what
());
}
}
}
...
...
@@ -4177,10 +4191,18 @@ namespace NLGUI
if
(
!
reloadImg
&&
lookupLocalFile
(
finalUrl
,
image
.
c_str
(),
false
))
{
// don't display image that are not power of 2
uint32
w
,
h
;
CBitmap
::
loadSize
(
image
,
w
,
h
);
if
(
w
==
0
||
h
==
0
||
((
!
NLMISC
::
isPowerOf2
(
w
)
||
!
NLMISC
::
isPowerOf2
(
h
))
&&
!
NL3D
::
CTextureFile
::
supportNonPowerOfTwoTextures
()))
try
{
uint32
w
,
h
;
CBitmap
::
loadSize
(
image
,
w
,
h
);
if
(
w
==
0
||
h
==
0
||
((
!
NLMISC
::
isPowerOf2
(
w
)
||
!
NLMISC
::
isPowerOf2
(
h
))
&&
!
NL3D
::
CTextureFile
::
supportNonPowerOfTwoTextures
()))
image
=
"web_del.tga"
;
}
catch
(
const
NLMISC
::
Exception
&
e
)
{
nlwarning
(
e
.
what
());
image
=
"web_del.tga"
;
}
}
else
{
...
...
@@ -4376,10 +4398,18 @@ namespace NLGUI
}
else
{
uint32
w
,
h
;
CBitmap
::
loadSize
(
normal
,
w
,
h
);
if
(
w
==
0
||
h
==
0
)
try
{
uint32
w
,
h
;
CBitmap
::
loadSize
(
normal
,
w
,
h
);
if
(
w
==
0
||
h
==
0
)
normal
=
"web_del.tga"
;
}
catch
(
const
NLMISC
::
Exception
&
e
)
{
nlwarning
(
e
.
what
());
normal
=
"web_del.tga"
;
}
}
}
}
...
...
code/nel/src/misc/bitmap_gif.cpp
View file @
169ab7d9
...
...
@@ -65,7 +65,7 @@ static int readGIFData(GifFileType *gif, GifByteType *data, int length)
}
catch
(...)
{
nlwarning
(
"error while reading
JPEG
image"
);
nlwarning
(
"error while reading
GIF
image"
);
return
0
;
}
...
...
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