How to stop GD2 from washing away the colors upon resizing images?

I’ve managed to further test this with Imagick: The left half of the image was processed with Imagick and the sRGB_IEC61966-2-1_no_black_scaling.icc color profile, the right half has no color profile associated and shows exactly the same if processed with Imagick or GD; here is the code I used: header(‘Content-type: image/jpeg’); $image = new Imagick(‘/path/to/DSC07275.jpg’); if … Read more

Laravel / Intervention Image Class – class not found

Step 1: Add “intervention/image”: “dev-master” to the “require” section of your composer.json file. “require”: { “laravel/framework”: “4.1.*”, “intervention/image”: “dev-master” }, Step 2: Run CMD; $ composer install If you’ve got this warning: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update … Read more

Resize image in WPF

As to the resizing itself, using WPF’s TransformedBitmap seems a bit easier: var bitmap = new TransformedBitmap(bitmapSource, new ScaleTransform( newWidth / bitmapSource.PixelWidth, newHeight / bitmapSource.PixelHeight));