Created
January 6, 2023 10:31
-
-
Save Mad182/c6a1cca6f9507fa97d00f36757a123b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$files = glob('orig/*.jpg'); | |
foreach($files as $file) { | |
$newname = substr($file, 7, 2) . substr($file, 5, 2) . substr($file, 9); | |
$txt = substr($file, 5, 2) . '.' . substr($file, 7, 2) . '.' . substr($file, 9, 4); | |
exec('convert '.$file.' -resize 666x1170 \( xc:transparent -font PT_Sans-Narrow-Web-Bold.ttf -pointsize 50 -fill black -draw "rotate -4 text 20,60 '."'".$txt."'".'" -blur 0x1 \) -geometry +2+2 -composite -font PT_Sans-Narrow-Web-Bold.ttf -fill white -pointsize 50 -draw "text 20,60 '."'".$txt."'".'" renamed/'.$newname); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment