TheFan1968

Bild-Manipulation mit Spatie

Feb 28th, 2026
13,437
1
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | Source Code | 1 0
  1. use Spatie\Image\Image;
  2. use Spatie\Image\Enums\AlignPosition;
  3. use Spatie\Image\Enums\Unit;
  4.  
  5. Image::load(storage_path('app/public/input.jpg'))
  6.     // 1. Größe anpassen (Fit kombiniert Resize & Crop)
  7.     ->fit(800, 600)
  8.    
  9.     // 2. Text mit Hintergrund hinzufügen
  10.     // Spatie erlaubt es, Text-Eigenschaften in einer Closure zu definieren
  11.     ->text('Ihr Text hier', function($font) {
  12.         $font->file(public_path('fonts/Roboto-Bold.ttf'))
  13.              ->size(40)
  14.              ->color('ffffff')
  15.              ->width(700) // Maximale Breite des Textblocks
  16.              ->align(AlignPosition::Center)
  17.              // Hier tricksen wir: Der Hintergrund wird direkt am Text ausgerichtet
  18.              ->background('rgba(0, 0, 0, 0.6)')
  19.              ->padding(20); // Abstand zwischen Text und Hintergrundbox
  20.     })
  21.    
  22.     // Position des Textblocks auf dem Gesamtbild
  23.     ->textPosition(AlignPosition::Bottom)
  24.    
  25.     ->save(storage_path('app/public/output.jpg'));
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Cykadta
    28 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Evvikiw
    5 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=hfuyvozwyi
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment