-
Notifications
You must be signed in to change notification settings - Fork 3
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
Retrieving data #1
Comments
Have you seen the code sample in the readme?
What you can do to create an interface like the above is Would it be useful for you to get the textual signature of the tag or data type for each tag? |
I saw your code, you did a great job following the pdf specs. Something like that:
|
Going deeper than the example code in description, how to get TagTypeSignature enum cases? let myData = try Data(contentsOf: url)
let profile = try ICCColorProfile(data: myData)
for tag in profile.tags {
switch tag {
case .profileDescription(.textDescription(let signature)): print(signature.sig)
default: break
}
} |
I think I’m going to have to make some breaking changes and have something like
where data is a enum of different types |
With signature I refer to an public struct textDescriptionType {
public let sig: TagTypeSignature // <-- this enum
...
Is possible and how retrieve the data of public enum TagTypeSignature: String {
/// [ICC.1:2010] 10.2 chromaticityType
case chromacityType = "chrm"
/// [ICC.1:2010] 10.3 colorantOrderType
case colorantOrderType = "clro"
/// [ICC.1:2010] 10.4 colorantTableType
case colorantTableType = "clrt"
/// [ICC.1:2001-04] 6.5.15 screeningType
case screeningType = "scrn"
... |
See #2 I'm not going to create a UI to display things, as it should be trivial to do that in your own SwiftUI component once that PR is merged in (please review and let me know so I can submit:) ) If you do create the component and want to send it in as a PR I may consider it |
This refactoring makes everything much more practical. Grate job! I agree with you, the interface becomes a trivial thing with these changes. Everything looks ok, for merging the PR! |
Well noticed, find replace is annoying in xcode :( Fixed |
Also released 1.1.0 - update! |
How is it possible with this code in READ.me to recover name, version, profile type, copyright, etc ...?
Something like that is possible?
The text was updated successfully, but these errors were encountered: