Changeset 3410991
- Timestamp:
- 12/04/2025 01:29:29 PM (4 months ago)
- Location:
- raina-image-compression
- Files:
-
- 4 edited
- 1 copied
-
tags/1.8.2 (copied) (copied from raina-image-compression/trunk)
-
tags/1.8.2/raina-image-compression.php (modified) (2 diffs)
-
tags/1.8.2/readme.txt (modified) (2 diffs)
-
trunk/raina-image-compression.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
raina-image-compression/tags/1.8.2/raina-image-compression.php
r3405323 r3410991 4 4 * Description: Raina Image Compression automatically optimizes JPG, PNG, and WebP images on upload for faster, cleaner websites. It resizes, converts, and compresses images without losing quality — all handled locally, with no external services required. 5 5 * Plugin URI: https://www.reggae.it/my-wordpress-plugins 6 * Version: 1.8 6 * Version: 1.8.2 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 593 593 $h = imagesy($img); 594 594 595 596 597 for ($x = 0; $x < $w; $x++) { 598 for ($y = 0; $y < $h; $y++) { 599 $rgba = imagecolorat($img, $x, $y); 600 $alpha = ($rgba & 0x7F000000) >> 24; // 0 = opaco, 127 = totalmente trasparente 595 // Campionamento ogni 4 pixel per accelerare 596 $step = 4; 597 598 for ($x = 0; $x < $w; $x += $step) { 599 for ($y = 0; $y < $h; $y += $step) { 600 601 $rgba = imagecolorat($img, $x, $y); 602 $alpha = ($rgba & 0x7F000000) >> 24; 603 604 // Pixel realmente trasparente? 601 605 if ($alpha > 0) { 602 return true; // Trova trasparenza606 return true; 603 607 } 604 608 } 605 609 } 606 return false; // Nessuna trasparenza 607 } 610 611 return false; 612 } 613 608 614 609 615 -
raina-image-compression/tags/1.8.2/readme.txt
r3405323 r3410991 4 4 Tags: image compression, image optimization, webp, jpg, png 5 5 Tested up to: 6.8 6 Stable tag: 1.8 6 Stable tag: 1.8.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 113 113 4. Admin bar toggle for quick enable/disable. 114 114 5. Outputfile Options 115 6. Comparison between the original image 2Mb and the optimized version 79kb. Image width px: 1200, JPG quality 70. 116 7. Comparison between the original image 7Mb and the optimized version 55kb. Image width px: 1200, JPG quality 70. 117 8. Comparison between the original image 1Mb and the optimized version 91kb. Image width px: 1200, JPG quality 70. 115 118 116 119 == Changelog == 120 121 = 1.8.2 = 122 * Fixed an issue where non-transparent images were incorrectly detected as transparent. 123 * Updated some Text in Option Page 124 117 125 118 126 = 1.8 = -
raina-image-compression/trunk/raina-image-compression.php
r3405323 r3410991 4 4 * Description: Raina Image Compression automatically optimizes JPG, PNG, and WebP images on upload for faster, cleaner websites. It resizes, converts, and compresses images without losing quality — all handled locally, with no external services required. 5 5 * Plugin URI: https://www.reggae.it/my-wordpress-plugins 6 * Version: 1.8 6 * Version: 1.8.2 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 593 593 $h = imagesy($img); 594 594 595 596 597 for ($x = 0; $x < $w; $x++) { 598 for ($y = 0; $y < $h; $y++) { 599 $rgba = imagecolorat($img, $x, $y); 600 $alpha = ($rgba & 0x7F000000) >> 24; // 0 = opaco, 127 = totalmente trasparente 595 // Campionamento ogni 4 pixel per accelerare 596 $step = 4; 597 598 for ($x = 0; $x < $w; $x += $step) { 599 for ($y = 0; $y < $h; $y += $step) { 600 601 $rgba = imagecolorat($img, $x, $y); 602 $alpha = ($rgba & 0x7F000000) >> 24; 603 604 // Pixel realmente trasparente? 601 605 if ($alpha > 0) { 602 return true; // Trova trasparenza606 return true; 603 607 } 604 608 } 605 609 } 606 return false; // Nessuna trasparenza 607 } 610 611 return false; 612 } 613 608 614 609 615 -
raina-image-compression/trunk/readme.txt
r3405323 r3410991 4 4 Tags: image compression, image optimization, webp, jpg, png 5 5 Tested up to: 6.8 6 Stable tag: 1.8 6 Stable tag: 1.8.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 113 113 4. Admin bar toggle for quick enable/disable. 114 114 5. Outputfile Options 115 6. Comparison between the original image 2Mb and the optimized version 79kb. Image width px: 1200, JPG quality 70. 116 7. Comparison between the original image 7Mb and the optimized version 55kb. Image width px: 1200, JPG quality 70. 117 8. Comparison between the original image 1Mb and the optimized version 91kb. Image width px: 1200, JPG quality 70. 115 118 116 119 == Changelog == 120 121 = 1.8.2 = 122 * Fixed an issue where non-transparent images were incorrectly detected as transparent. 123 * Updated some Text in Option Page 124 117 125 118 126 = 1.8 =
Note: See TracChangeset
for help on using the changeset viewer.