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
Olena
olena
Commits
8c828c81
Commit
8c828c81
authored
Aug 27, 2013
by
Roland Levillain
Browse files
Display Milena fatal errors on std::cerr, not std::cout.
* mln/io/pdf/load.hh, * mln/io/tiff/load.hh: Here.
parent
3124478b
Changes
3
Hide whitespace changes
Inline
Side-by-side
milena/ChangeLog
View file @
8c828c81
2013-08-27 Roland Levillain <roland@lrde.epita.fr>
Display Milena fatal errors on std::cerr, not std::cout.
* mln/io/pdf/load.hh,
* mln/io/tiff/load.hh:
Here.
2013-08-27 Roland Levillain <roland@lrde.epita.fr>
Remove Milena debug code making side effects on streams.
milena/mln/io/pdf/load.hh
View file @
8c828c81
...
...
@@ -201,7 +201,7 @@ namespace mln
{
case
poppler
::
image
::
format_invalid
:
case
poppler
::
image
::
format_mono
:
std
::
c
out
<<
"Loading black and white pdf is not implemented!"
;
std
::
c
err
<<
"Loading black and white pdf is not implemented!"
;
abort
();
break
;
case
poppler
::
image
::
format_rgb24
:
...
...
@@ -225,7 +225,7 @@ namespace mln
poppler
::
page_renderer
pr
;
if
(
!
pr
.
can_render
())
{
std
::
c
out
<<
"PDF cannot be rendered! Make sure libpoppler is "
std
::
c
err
<<
"PDF cannot be rendered! Make sure libpoppler is "
<<
"compiled with a render backend."
<<
std
::
endl
;
abort
();
}
...
...
@@ -282,7 +282,7 @@ namespace mln
if
(
first_page
<
0
||
first_page
>
(
pdf
->
pages
()
-
1
)
||
last_page
<
0
||
last_page
>
(
pdf
->
pages
()
-
1
))
{
std
::
c
out
<<
"Error while loading PDF: page range is not correct!"
std
::
c
err
<<
"Error while loading PDF: page range is not correct!"
<<
std
::
endl
;
abort
();
}
...
...
@@ -313,7 +313,7 @@ namespace mln
{
if
(
pages
[
i
]
<
0
||
pages
[
i
]
>
pdf
->
pages
()
-
1
)
{
std
::
c
out
<<
"Error while loading PDF: selected page "
std
::
c
err
<<
"Error while loading PDF: selected page "
<<
pages
[
i
]
<<
" does not exist!"
<<
std
::
endl
;
abort
();
}
...
...
milena/mln/io/tiff/load.hh
View file @
8c828c81
// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
// Copyright (C) 2009, 2012
, 2013
EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
...
...
@@ -156,7 +156,7 @@ namespace mln
uint16
data_size
=
bits_per_sample
*
samples_per_pixel
;
if
(
data_size
!=
24
&&
data_size
!=
32
)
{
std
::
c
out
<<
"Trying to load a non color TIFF "
std
::
c
err
<<
"Trying to load a non color TIFF "
<<
"image into a color Milena image."
<<
std
::
endl
;
abort
();
}
...
...
@@ -166,7 +166,7 @@ namespace mln
if
(
!
TIFFReadRGBAImage
(
file
,
ima
.
ncols
(),
ima
.
nrows
(),
raster
,
0
))
{
std
::
c
out
<<
"Error while reading the image file. Is it corrupted?"
std
::
c
err
<<
"Error while reading the image file. Is it corrupted?"
<<
std
::
endl
;
abort
();
}
...
...
@@ -231,7 +231,7 @@ namespace mln
TIFFGetField
(
file
,
TIFFTAG_SAMPLESPERPIXEL
,
&
samples_per_pixel
);
if
(
samples_per_pixel
!=
1
)
{
std
::
c
out
<<
"Trying to load a non grayscale TIFF "
std
::
c
err
<<
"Trying to load a non grayscale TIFF "
<<
"image into a grayscale Milena image."
<<
std
::
endl
;
abort
();
}
...
...
@@ -241,7 +241,7 @@ namespace mln
if
(
!
TIFFReadRGBAImage
(
file
,
ima
.
ncols
(),
ima
.
nrows
(),
raster
,
0
))
{
std
::
c
out
<<
"Error while reading the image file. Is it corrupted?"
std
::
c
err
<<
"Error while reading the image file. Is it corrupted?"
<<
std
::
endl
;
abort
();
}
...
...
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