forked from alchemy-fr/Imagine
-
Notifications
You must be signed in to change notification settings - Fork 1
[REF] Update ICC profiles and licenses; remove Adobe resources #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
softstartcode
merged 5 commits into
tikiorg:master
from
sandeepa-12:remove-adobe-resources
Oct 5, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0ac9472
[REF] Update ICC profiles and licenses; remove Adobe resources
sandeepa-12 3f686fb
[NEW] Add quality test suite and fix Grayscale palette ICC profile
sandeepa-12 28eeced
[REF] Add GitHub Actions workflows for CI/CD pipeline
sandeepa-12 ef5f3b0
[REF] Update CI configuration to trigger on pull requests to master
sandeepa-12 18e5daa
[REM] Remove CI/CD workflows for GitHub Actions
sandeepa-12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-279 KB
lib/Imagine/resources/Adobe/Color Profile Bundling License_10.15.08.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Imagine package. | ||
* | ||
* (c) Tiki Wiki CMS Groupware Project | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Imagine\Test\Image\Palette; | ||
|
||
use Imagine\Image\Palette\CMYK as CMYKPalette; | ||
use Imagine\Image\Palette\RGB as RGBPalette; | ||
use Imagine\Test\ImagineTestCase; | ||
|
||
/** | ||
* Color Accuracy Test | ||
* | ||
* Verifies that color values are accurately represented across different palettes. | ||
* This test ensures quality is maintained after replacing Adobe ICC profiles | ||
* with open-source alternatives (ISOcoated_v2_grey1c_bas.ICC). | ||
*/ | ||
class ColorAccuracyTest extends ImagineTestCase | ||
{ | ||
/** | ||
* @dataProvider cmykPrimaryColorsProvider | ||
*/ | ||
public function testCMYKPrimaryColorsAccuracy($name, $cmykValues, $expectedC, $expectedM, $expectedY, $expectedK) | ||
{ | ||
$palette = new CMYKPalette(); | ||
$color = $palette->color($cmykValues); | ||
|
||
$this->assertEquals($expectedC, $color->getCyan(), "Cyan value incorrect for $name"); | ||
$this->assertEquals($expectedM, $color->getMagenta(), "Magenta value incorrect for $name"); | ||
$this->assertEquals($expectedY, $color->getYellow(), "Yellow value incorrect for $name"); | ||
$this->assertEquals($expectedK, $color->getKeyline(), "Black value incorrect for $name"); | ||
} | ||
|
||
public static function cmykPrimaryColorsProvider() | ||
{ | ||
return [ | ||
'Pure Cyan' => ['Pure Cyan', [100, 0, 0, 0], 100, 0, 0, 0], | ||
'Pure Magenta' => ['Pure Magenta', [0, 100, 0, 0], 0, 100, 0, 0], | ||
'Pure Yellow' => ['Pure Yellow', [0, 0, 100, 0], 0, 0, 100, 0], | ||
'Pure Black' => ['Pure Black', [0, 0, 0, 100], 0, 0, 0, 100], | ||
'White' => ['White', [0, 0, 0, 0], 0, 0, 0, 0], | ||
'Mid Gray' => ['Mid Gray', [0, 0, 0, 50], 0, 0, 0, 50], | ||
]; | ||
} | ||
|
||
/** | ||
* @dataProvider rgbPrimaryColorsProvider | ||
*/ | ||
public function testRGBPrimaryColorsAccuracy($name, $rgbValues, $expectedR, $expectedG, $expectedB) | ||
{ | ||
$palette = new RGBPalette(); | ||
$color = $palette->color($rgbValues); | ||
|
||
$this->assertEquals($expectedR, $color->getRed(), "Red value incorrect for $name"); | ||
$this->assertEquals($expectedG, $color->getGreen(), "Green value incorrect for $name"); | ||
$this->assertEquals($expectedB, $color->getBlue(), "Blue value incorrect for $name"); | ||
} | ||
|
||
public static function rgbPrimaryColorsProvider() | ||
{ | ||
return [ | ||
'Pure Red' => ['Pure Red', [255, 0, 0], 255, 0, 0], | ||
'Pure Green' => ['Pure Green', [0, 255, 0], 0, 255, 0], | ||
'Pure Blue' => ['Pure Blue', [0, 0, 255], 0, 0, 255], | ||
'Black' => ['Black', [0, 0, 0], 0, 0, 0], | ||
'White' => ['White', [255, 255, 255], 255, 255, 255], | ||
'Mid Gray' => ['Mid Gray', [128, 128, 128], 128, 128, 128], | ||
]; | ||
} | ||
|
||
public function testCMYKColorConsistency() | ||
{ | ||
$palette = new CMYKPalette(); | ||
|
||
// Create same color twice | ||
$color1 = $palette->color([50, 25, 75, 10]); | ||
$color2 = $palette->color([50, 25, 75, 10]); | ||
|
||
// Should be the same object (color caching) | ||
$this->assertSame($color1, $color2, 'Color caching should return same object'); | ||
|
||
// Values should match | ||
$this->assertEquals(50, $color1->getCyan()); | ||
$this->assertEquals(25, $color1->getMagenta()); | ||
$this->assertEquals(75, $color1->getYellow()); | ||
$this->assertEquals(10, $color1->getKeyline()); | ||
} | ||
|
||
public function testRGBColorConsistency() | ||
{ | ||
$palette = new RGBPalette(); | ||
|
||
// Create same color twice | ||
$color1 = $palette->color([128, 64, 192]); | ||
$color2 = $palette->color([128, 64, 192]); | ||
|
||
// Should be the same object (color caching) | ||
$this->assertSame($color1, $color2, 'Color caching should return same object'); | ||
|
||
// Values should match | ||
$this->assertEquals(128, $color1->getRed()); | ||
$this->assertEquals(64, $color1->getGreen()); | ||
$this->assertEquals(192, $color1->getBlue()); | ||
} | ||
|
||
public function testCMYKColorStringRepresentation() | ||
{ | ||
$palette = new CMYKPalette(); | ||
$color = $palette->color([100, 50, 25, 10]); | ||
|
||
$expected = 'cmyk(100%, 50%, 25%, 10%)'; | ||
$this->assertEquals($expected, (string) $color); | ||
} | ||
|
||
public function testRGBColorHexRepresentation() | ||
{ | ||
$palette = new RGBPalette(); | ||
$color = $palette->color([255, 128, 64]); | ||
|
||
$expected = '#ff8040'; | ||
$this->assertEquals($expected, (string) $color); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.