Support a couple more Photoshop blend modes
This commit is contained in:
parent
50d532aac9
commit
985241a8b3
3 changed files with 15 additions and 4 deletions
5
Dependencies/PSDWriter/Shared/PSDLayer.h
vendored
5
Dependencies/PSDWriter/Shared/PSDLayer.h
vendored
|
@ -49,7 +49,10 @@
|
|||
kPSDBlendModeScreen,
|
||||
kPSDBlendModeColorDodge,
|
||||
kPSDBlendModeLinearDodge,
|
||||
kPSDBlendModeLighter
|
||||
kPSDBlendModeLighter,
|
||||
|
||||
kPSDBlendModeVividLight,
|
||||
kPSDBlendModeHardLight
|
||||
};
|
||||
|
||||
@property (nonatomic, assign) NSInteger blendMode;
|
||||
|
|
8
Dependencies/PSDWriter/Shared/PSDWriter.m
vendored
8
Dependencies/PSDWriter/Shared/PSDWriter.m
vendored
|
@ -39,6 +39,11 @@ char blendModeHueKey[4] = {'h','u','e',' '};
|
|||
char blendModeSatKey[4] = {'s','a','t',' '};
|
||||
char blendModeColKey[4] = {'c','o','l','r'};
|
||||
char blendModeLumKey[4] = {'l','u','m',' '};
|
||||
|
||||
char blendModevLiteKey[4] = {'v','L','i','t'};
|
||||
char blendModehLiteKey[4] = {'h','L','i','t'};
|
||||
|
||||
|
||||
char *blendModes[36] =
|
||||
{ &blendModeNormKey,
|
||||
&blendModeDissKey,
|
||||
|
@ -55,6 +60,9 @@ char *blendModes[36] =
|
|||
&blendModeLddgKey,
|
||||
&blendModeLgClKey,
|
||||
|
||||
&blendModevLiteKey,
|
||||
&blendModehLiteKey,
|
||||
|
||||
0 };
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
|||
return kPSDBlendModeScreen
|
||||
}
|
||||
if layer.data.blendMode == 13 {
|
||||
//blendMode = kPSDBlendModeHardLight
|
||||
return kPSDBlendModeHardLight
|
||||
}
|
||||
if layer.data.blendMode == 9 {
|
||||
return kPSDBlendModeColorDodge
|
||||
|
@ -82,7 +82,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
|||
//blendMode = kPSDBlendModeLighterColor
|
||||
}
|
||||
if layer.data.extendedBlend == 21 {
|
||||
//blendMode = kPSDBlendModeVividLight
|
||||
return kPSDBlendModeVividLight
|
||||
}
|
||||
if layer.data.extendedBlend == 22 {
|
||||
//blendMode = kPSdBlendModeLinearLight
|
||||
|
@ -105,7 +105,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
|||
//return .softLight
|
||||
}
|
||||
if layer.data.blendMode == 12 {
|
||||
//return .hardLight
|
||||
return kPSDBlendModeHardLight
|
||||
}
|
||||
if layer.data.blendMode == 6 {
|
||||
//return .difference
|
||||
|
|
Reference in a new issue