[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master a94fe8d: Atleast one width is required for PDF
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master a94fe8d: Atleast one width is required for PDF or EPS outputs in ConvertType |
Date: |
Fri, 23 Nov 2018 15:19:23 -0500 (EST) |
branch: master
commit a94fe8d9d07b1a2b78ab703126185356822e6404
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Atleast one width is required for PDF or EPS outputs in ConvertType
When none of the width options (`--borderwidth', or `--widthincm') are set
and an EPS or PDF output is desired, until now, ConvertType wouldn't
complain and produces a blank page (the size of the output becomes zero, or
nothing)! This could cause a lot of confusion! So a check has been added
when these formats are requested informing the user to atleast provide one
of these width values.
---
NEWS | 2 +-
bin/convertt/ui.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index cb24499..b898bf8 100644
--- a/NEWS
+++ b/NEWS
@@ -129,7 +129,7 @@ GNU Astronomy Utilities NEWS -*-
outline -*-
bug #54782: Segment's check image not removing sky clumps some tiles.
bug #54810: Arithmetic crash when previously named operand renamed.
bug #55025: MakeCatalog's `--prepforconv' option being ignored.
-
+ bug #55079: Blank EPS or PDF page when width options not given.
* Noteworthy changes in release 0.7 (library 5.0.0) (2018-08-08) [stable]
diff --git a/bin/convertt/ui.c b/bin/convertt/ui.c
index 47b2194..b6ed928 100644
--- a/bin/convertt/ui.c
+++ b/bin/convertt/ui.c
@@ -702,6 +702,9 @@ ui_set_output(struct converttparams *p)
/* EPS */
else if(gal_eps_name_is_eps(cp->output))
{
+ if(p->borderwidth==0 && p->widthincm==0)
+ error(EXIT_FAILURE, 0, "at least one of `--widthincm' (`-u'), or "
+ "`--borderwidth (`-b') options are necessary for an EPS output");
p->outformat=OUT_FORMAT_EPS;
if( gal_eps_suffix_is_eps(cp->output) )
ui_add_dot_use_automatic_output(p);
@@ -710,6 +713,9 @@ ui_set_output(struct converttparams *p)
/* PDF */
else if(gal_pdf_name_is_pdf(cp->output))
{
+ if(p->borderwidth==0 && p->widthincm==0)
+ error(EXIT_FAILURE, 0, "at least one of `--widthincm' (`-u'), or "
+ "`--borderwidth (`-b') options are necessary for a PDF output");
p->outformat=OUT_FORMAT_PDF;
if( gal_pdf_suffix_is_pdf(cp->output) )
ui_add_dot_use_automatic_output(p);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master a94fe8d: Atleast one width is required for PDF or EPS outputs in ConvertType,
Mohammad Akhlaghi <=