
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (104)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (12285)
-
How to Convert PNG Transparent Background to JPG White Background ?
28 décembre 2016, par Matt McManisI’m converting a PNG to JPG. The transparent background turns black by default. I need it to be white.
What is the FFmpeg command to set the alpha channel to a color ?
I think it has something to do with the alphamerge and alphaextract Filters.
ffmpeg -i image.png -qscale:v 2 image.jpg
This replaces white with transparency when converting to png :
-vf chromakey=white
-
after scaled transparent video,Video scaled with white background(jpg) [on hold]
7 mars 2017, par Sohaib RazaI am scaled video using ffmpeg. After scaled video the transparent video to the scaled video with white background.
Using below commendffmpeg -i inputVideo.mp4 -vf scale=100p:100 outputVideo.mp4
using this commend transparent video convert to the white background video.
-
How can I resize an image then centralize it with a white background ? Can it be done using php-Imagine library ?
6 février 2017, par BOBOThe effect I would like to generate is exactly like the example in
this StackOverflow thread : (Related Question)1.Resize image
2.Keep proportion
3.Add or Fill none-image areas with white backgroundHere are three examples of this process below :
1. If original is square no matter 640*640 or 1024*1024, just resize it to target dimension e.g. 480*480 will work.
-
If the original input is vertical rectangular,the output should not be cropped
and still be centerlized as below (the red dash edge marker is just make it easier to see the background is white and the proportion is kept after image resized to 480*480 px)
-
if the original input is horizontal rectangular, output like below, white background, keeps proportion and image uncroped , thus without losing anything after the image processing.
So after I’ve clarified such a question,
I would like to know :- Is there a general name of such Custom Image Resize mentioned above ?
- would like to know how to achieve it using php image library Imagine ?
is it doable using php-imagine, or have to switch to another library, e.g imagemagick ?
P.S. If you would like to achieve the effect either in image-resizing or video resizing, you can use below FFMPEG single-line command.
(thanks to @Mulvya, yes below code applies both to videos and image formats)[run below built-in code in ffmpeg console to achieve the mentioned resize effect]
[video resize]
ffmpeg -i "[raw video url or videofile location.mp4]" -vf "scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw)/2:(480-ih)/2:color=white" [save_path_and_filename].mp4
[image resize]
ffmpeg -i "[raw image url or imagefile location.jpg]" -vf "scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw)/2:(480-ih)/2:color=white" [save_path_and_filename].jpg
-