diff mbox

[5/5] convert: Accept destination format as parameter

Message ID 1526032839-14536-6-git-send-email-jacopo@jmondi.org (mailing list archive)
State Not Applicable
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Jacopo Mondi May 11, 2018, 10 a.m. UTC
Accept the destination image format as thrid parameter of the convert
function.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 convert.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund May 11, 2018, 11:22 a.m. UTC | #1
Hi Jacopo,

Thanks for your work.

On 2018-05-11 12:00:39 +0200, Jacopo Mondi wrote:
> Accept the destination image format as thrid parameter of the convert
> function.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  convert.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/convert.sh b/convert.sh
> index 4059868..878ac63 100755
> --- a/convert.sh
> +++ b/convert.sh
> @@ -2,6 +2,7 @@
>  
>  F=$(dirname $1)/$(basename $1 .bin)
>  FRAME_SIZE=${2:-1280x720}
> +FORMAT=${3:-RGB565}
>  
> -raw2rgbpnm -f RGB565 -s $FRAME_SIZE $F.bin $F.pnm
> +raw2rgbpnm -f $FORMAT -s $FRAME_SIZE $F.bin $F.pnm
>  convert $F.pnm $F.png
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/convert.sh b/convert.sh
index 4059868..878ac63 100755
--- a/convert.sh
+++ b/convert.sh
@@ -2,6 +2,7 @@ 
 
 F=$(dirname $1)/$(basename $1 .bin)
 FRAME_SIZE=${2:-1280x720}
+FORMAT=${3:-RGB565}
 
-raw2rgbpnm -f RGB565 -s $FRAME_SIZE $F.bin $F.pnm
+raw2rgbpnm -f $FORMAT -s $FRAME_SIZE $F.bin $F.pnm
 convert $F.pnm $F.png