-
Notifications
You must be signed in to change notification settings - Fork 358
feat: add Nikon Z Picture Control support #361
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
base: main
Are you sure you want to change the base?
Conversation
|
@rmanalan is attempting to deploy a commit to the Sam Becker Hobby Team on Vercel. A member of the Team first needs to authorize it. |
sambecker
left a comment
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.
src/platforms/nikon/server.ts
Outdated
| // Let's try to parse it as a TIFF IFD starting at offset 10. | ||
|
|
||
| export const isExifForNikon = (data: ExifData) => | ||
| data.tags?.Make?.toUpperCase() === MAKE_NIKON; |
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.
Can this use isMakeNikon()?
| import { FujifilmRecipe } from '@/platforms/fujifilm/recipe'; | ||
| import { FujifilmSimulation } from '@/platforms/fujifilm/simulation'; | ||
| import type { ExifData, ExifTags } from 'ts-exif-parser'; | ||
|
|
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.
Remove blank line
src/photo/server.ts
Outdated
| } | ||
| } | ||
|
|
||
| // Capture Picture Control for Nikon cameras |
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.
Can this be combined with the block above? i.e., if (isExifForFujifilm || isExifForNikon)?
src/platforms/nikon/server.ts
Outdated
| // 0x2A00 (42) | ||
| // Offset to first IFD (4 bytes) | ||
|
|
||
| // Actually, Nikon Type 3 usually starts directly with the IFD count at offset 10? |
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.
This looks like LLM chat—can you clean up?
src/platforms/nikon/simulation.ts
Outdated
| // This is a guess based on some sources, might need adjustment. | ||
| // Actually, let's look for a string tag. | ||
| // Some sources say PictureControlName is inside the PictureControl binary block (0x71). | ||
| // But ExifTool lists PictureControlName as a separate tag in some models. | ||
| // Let's try to find a string that looks like a Picture Control name. |
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.
More LLM output
src/platforms/nikon/simulation.ts
Outdated
| export const NIKON_PICTURE_CONTROL_LABELS: Record<string, string> = { | ||
| 'Standard': 'Standard', | ||
| 'Neutral': 'Neutral', | ||
| 'Vivid': 'Vivid', | ||
| 'Monochrome': 'Monochrome', | ||
| 'Portrait': 'Portrait', | ||
| 'Landscape': 'Landscape', | ||
| 'Flat': 'Flat', | ||
| 'Auto': 'Auto', | ||
| 'Dream': 'Dream', | ||
| 'Morning': 'Morning', | ||
| 'Pop': 'Pop', | ||
| 'Sunday': 'Sunday', | ||
| 'Somber': 'Somber', | ||
| 'Dramatic': 'Dramatic', | ||
| 'Silence': 'Silence', | ||
| 'Bleached': 'Bleached', | ||
| 'Melancholic': 'Melancholic', | ||
| 'Pure': 'Pure', | ||
| 'Denim': 'Denim', | ||
| 'Toy': 'Toy', | ||
| 'Sepia': 'Sepia', | ||
| 'Blue': 'Blue', | ||
| 'Red': 'Red', | ||
| 'Pink': 'Pink', | ||
| 'Charcoal': 'Charcoal', | ||
| 'Graphite': 'Graphite', | ||
| 'Binary': 'Binary', | ||
| 'Carbon': 'Carbon', | ||
| }; | ||
|
|
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.
What's the purpose of this map?
Thanks for the review. I've cleaned it up a bit. As for your question about prepopulating the film options, I'd say it's not necessary since most of the "Nikon Picture Controls" people are using are not the ones Nikon ships. Also, the list of native picture controls vary by Nikon camera. |
…remove unused code and comments.
78c094f to
6b147fe
Compare

Hey @sambecker! Sorry this took so long. Let me know what you think.