Sponsored Content
Full Discussion: Change size of watermark
Top Forums UNIX for Advanced & Expert Users Change size of watermark Post 303034435 by locoroco on Thursday 25th of April 2019 03:54:51 PM
Old 04-25-2019
Answering my own question. Here I have chosen to scale from height. It is also possible to scale from width.



Code:
height=$(ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 $filename | awk -F '=' '/height/{print $2}')
ffmpeg -i watermark2.png -y -v quiet -vf scale=$height*0.25:-1 scaled.png       #scale watermark
ffmpeg -i $filename -i scaled.png -filter_complex overlay=15:15 output.png      #add watermark

These 2 Users Gave Thanks to locoroco For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to change the tab size in vi?

the default size is 8. i found it's too big. how can i change the tab size in vi? is it a good idea to change it at all? thks (12 Replies)
Discussion started by: gusla
12 Replies

2. UNIX for Advanced & Expert Users

File system size change

Good morning folks! I'm new here.. trying to find an answer on how to resize filesystem. Need to add some space to c0t0d0s5, /var... Is it possible at all? JV (9 Replies)
Discussion started by: jvinn
9 Replies

3. UNIX for Dummies Questions & Answers

how to change \tmpdir directory or increase size?

Hi, We're stuck after the Unix admin left without prior notice. We have a web application running on mySQL. it seems that the \tmpdir for mySQL is mount to var\tmp directory which has only 60 MB of available disk space running any big query fails due to the size limitation I don't have... (13 Replies)
Discussion started by: ray
13 Replies

4. Solaris

Unix command for Watermark printing

Hi, Can anybody help me out with the unix command for watermark. i am using solaris 9. I have installed CUPS software. Printer driver supports watermark. I would like to know the watermark option for text,font and fontsize. lpr -P printername -o ________________ filename. please help... (1 Reply)
Discussion started by: meeraramanathan
1 Replies

5. Shell Programming and Scripting

how to find watermark in a pdf

Hi All, I have a few pdf files some of which have a watermark on it and my task is to find which all invoices have watermark without actually printing them. Is there any way we can do this in Unix. Strings is not helping. any idea how would I read binary file and grep for watermark. The... (7 Replies)
Discussion started by: rahulkav
7 Replies

6. Shell Programming and Scripting

change the font size in bash

Hi, I would like to change the font size in bash. I know how do it in ksh: F_VDOBLE="\033#6" print "${F_VDOBLE}Esto es..." But in bash I don't know Could you help me please? Many thanks! (5 Replies)
Discussion started by: mierdatuti
5 Replies

7. AIX

Change the Block size of AIX 6.1

Friends , I know the most cases the unix operation system holds the default block size 4MB . In AIX 5.3 and AIX 6.1 , also use upto 4 MB as its default block size .Now I want to change this value from 4MB to 8MB as AIX block size . Is it possible to change the block size value in AIX 6.1/5.3... (2 Replies)
Discussion started by: shipon_97
2 Replies

8. Windows & DOS: Issues & Discussions

Change tab size to 4

forum members, gvim version 6.0.150.0 Vi has been my favorite editor for over 30 years. Mostly with Unix but now with windows XP. It works fine but I want to change the tab to 4 spaces instead of 8. I read on the internet that I can edit the .vimrc file but I only have an _vimrc... (12 Replies)
Discussion started by: jerryd
12 Replies

9. Ubuntu

How to change ffmpeg default font size?

Hello, I have a problem with Greek subtitle font size when I map a subtitle file into a video in ffmpeg. I ran below code: ffmpeg -i video.mp4 -sub_charenc CP1253 -i video_sub.srt -c:v copy -c:a copy \ -c:s mov_text -metadata:s:s:0 language=gr mapped_video.mp4 When I play it in VLC,... (2 Replies)
Discussion started by: baris35
2 Replies
QSize(3qt)																QSize(3qt)

NAME
QSize - Defines the size of a two-dimensional object SYNOPSIS
#include <qsize.h> Public Members enum ScaleMode { ScaleFree, ScaleMin, ScaleMax } QSize () QSize ( int w, int h ) bool isNull () const bool isEmpty () const bool isValid () const int width () const int height () const void setWidth ( int w ) void setHeight ( int h ) void transpose () void scale ( int w, int h, ScaleMode mode ) void scale ( const QSize & s, ScaleMode mode ) QSize expandedTo ( const QSize & otherSize ) const QSize boundedTo ( const QSize & otherSize ) const QCOORD & rwidth () QCOORD & rheight () QSize & operator+= ( const QSize & s ) QSize & operator-= ( const QSize & s ) QSize & operator*= ( int c ) QSize & operator*= ( double c ) QSize & operator/= ( int c ) QSize & operator/= ( double c ) RELATED FUNCTION DOCUMENTATION
bool operator== ( const QSize & s1, const QSize & s2 ) bool operator!= ( const QSize & s1, const QSize & s2 ) const QSize operator+ ( const QSize & s1, const QSize & s2 ) const QSize operator- ( const QSize & s1, const QSize & s2 ) const QSize operator* ( const QSize & s, int c ) const QSize operator* ( int c, const QSize & s ) const QSize operator* ( const QSize & s, double c ) const QSize operator* ( double c, const QSize & s ) const QSize operator/ ( const QSize & s, int c ) const QSize operator/ ( const QSize & s, double c ) QDataStream & operator<< ( QDataStream & s, const QSize & sz ) QDataStream & operator>> ( QDataStream & s, QSize & sz ) DESCRIPTION
The QSize class defines the size of a two-dimensional object. A size is specified by a width and a height. The coordinate type is QCOORD (defined in <qwindowdefs.h> as int). The minimum value of QCOORD is QCOORD_MIN (-2147483648) and the maximum value is QCOORD_MAX(2147483647). The size can be set in the constructor and changed with setWidth() and setHeight(), or using operator+=(), operator-=(), operator*=() and operator/=(), etc. You can swap the width and height with transpose(). You can get a size which holds the maximum height and width of two sizes using expandedTo(), and the minimum height and width of two sizes using boundedTo(). See also QPoint, QRect, Graphics Classes, and Image Processing Classes. Member Type Documentation QSize::ScaleMode This enum type defines the different ways of scaling a size. <center> [Image Omitted] </center> QSize::ScaleFree - The size is scaled freely. The ratio is not preserved. QSize::ScaleMin - The size is scaled to a rectangle as large as possible inside a given rectangle, preserving the aspect ratio. QSize::ScaleMax - The size is scaled to a rectangle as small as possible outside a given rectangle, preserving the aspect ratio. See also QSize::scale(), QImage::scale(), and QImage::smoothScale(). MEMBER FUNCTION DOCUMENTATION
QSize::QSize () Constructs a size with invalid (negative) width and height. QSize::QSize ( int w, int h ) Constructs a size with width w and height h. QSize QSize::boundedTo ( const QSize & otherSize ) const Returns a size with the minimum width and height of this size and otherSize. QSize QSize::expandedTo ( const QSize & otherSize ) const Returns a size with the maximum width and height of this size and otherSize. Examples: int QSize::height () const Returns the height. See also width(). Examples: bool QSize::isEmpty () const Returns TRUE if the width is <= 0 or the height is <= 0, otherwise FALSE. bool QSize::isNull () const Returns TRUE if the width is 0 and the height is 0; otherwise returns FALSE. bool QSize::isValid () const Returns TRUE if the width is equal to or greater than 0 and the height is equal to or greater than 0; otherwise returns FALSE. QSize &; QSize::operator*= ( int c ) Multiplies both the width and height by c and returns a reference to the size. QSize &; QSize::operator*= ( double c ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Multiplies both the width and height by c and returns a reference to the size. Note that the result is truncated. QSize &; QSize::operator+= ( const QSize & s ) Adds s to the size and returns a reference to this size. Example: QSize s( 3, 7 ); QSize r( -1, 4 ); s += r; // s becomes (2,11) QSize &; QSize::operator-= ( const QSize & s ) Subtracts s from the size and returns a reference to this size. Example: QSize s( 3, 7 ); QSize r( -1, 4 ); s -= r; // s becomes (4,3) QSize &; QSize::operator/= ( int c ) Divides both the width and height by c and returns a reference to the size. QSize &; QSize::operator/= ( double c ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Divides both the width and height by c and returns a reference to the size. Note that the result is truncated. QCOORD &; QSize::rheight () Returns a reference to the height. Using a reference makes it possible to directly manipulate the height. Example: QSize s( 100, 10 ); s.rheight() += 5; // s becomes (100,15) See also rwidth(). QCOORD &; QSize::rwidth () Returns a reference to the width. Using a reference makes it possible to directly manipulate the width. Example: QSize s( 100, 10 ); s.rwidth() += 20; // s becomes (120,10) See also rheight(). void QSize::scale ( int w, int h, ScaleMode mode ) Scales the size to a rectangle of width w and height h according to the ScaleMode mode. If mode is ScaleFree, the size is set to (w, h). If mode is ScaleMin, the current size is scaled to a rectangle as large as possible inside (w, h), preserving the aspect ratio. If mode is ScaleMax, the current size is scaled to a rectangle as small as possible outside (w, h), preserving the aspect ratio. Example: QSize t1( 10, 12 ); t1.scale( 60, 60, QSize::ScaleFree ); // t1 is (60, 60) QSize t2( 10, 12 ); t2.scale( 60, 60, QSize::ScaleMin ); // t2 is (50, 60) QSize t3( 10, 12 ); t3.scale( 60, 60, QSize::ScaleMax ); // t3 is (60, 72) void QSize::scale ( const QSize & s, ScaleMode mode ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Equivalent to scale(s.width(), s.height(), mode). void QSize::setHeight ( int h ) Sets the height to h. See also height() and setWidth(). void QSize::setWidth ( int w ) Sets the width to w. See also width() and setHeight(). void QSize::transpose () Swaps the values of width and height. int QSize::width () const Returns the width. See also height(). Examples: RELATED FUNCTION DOCUMENTATION
bool operator!= ( const QSize & s1, const QSize & s2 ) Returns TRUE if s1 and s2 are different; otherwise returns FALSE. const QSize operator* ( const QSize &; s, int c ) Multiplies s by c and returns the result. const QSize operator* ( int c, const QSize &; s ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Multiplies s by c and returns the result. const QSize operator* ( const QSize &; s, double c ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Multiplies s by c and returns the result. const QSize operator* ( double c, const QSize &; s ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Multiplies s by c and returns the result. const QSize operator+ ( const QSize &; s1, const QSize & s2 ) Returns the sum of s1 and s2; each component is added separately. const QSize operator- ( const QSize &; s1, const QSize & s2 ) Returns s2 subtracted from s1; each component is subtracted separately. const QSize operator/ ( const QSize & s, int c ) Divides s by c and returns the result. const QSize operator/ ( const QSize & s, double c ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Divides s by c and returns the result. Note that the result is truncated. QDataStream &; operator<< ( QDataStream & s, const QSize & sz ) Writes the size sz to the stream s and returns a reference to the stream. See also Format of the QDataStream operators. bool operator== ( const QSize & s1, const QSize & s2 ) Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. QDataStream &; operator>> ( QDataStream & s, QSize & sz ) Reads the size from the stream s into size sz and returns a reference to the stream. See also Format of the QDataStream operators. SEE ALSO
http://doc.trolltech.com/qsize.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qsize.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QSize(3qt)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy