Skip to content

Instantly share code, notes, and snippets.

View josephsieh's full-sized avatar

Chih-Yao Hsieh josephsieh

  • Adobe Systems Incorporated
  • San Jose, CA, USA
View GitHub Profile
if ( rawEnabled && self.photoOutput.availableRawPhotoPixelFormatTypes.count ) {
//photoSettings = [[AVCapturePhotoBracketSettings alloc] initWithFormat:nil rawPixelFormatType:(OSType)(((NSNumber *)self.photoOutput.availableRawPhotoPixelFormatTypes[0]).unsignedLongValue) bracketedSettings:bracketedSettings];
photoSettings = [AVCapturePhotoBracketSettings photoBracketSettingsWithRawPixelFormatType:(OSType)(((NSNumber *)self.photoOutput.availableRawPhotoPixelFormatTypes[0]).unsignedLongValue) processedFormat:nil bracketedSettings:bracketedSettings];
}
else {
//photoSettings = [[AVCapturePhotoBracketSettings alloc] initWithFormat:@{ AVVideoCodecKey : AVVideoCodecJPEG } rawPixelFormatType:0 bracketedSettings:bracketedSettings];
photoSettings = [AVCapturePhotoBracketSettings photoBracketSettingsWithRawPixelFormatType:0 processedFormat:@{ AVVideoCodecKey : AVVideoCodecJPEG } bracketedSettings:bracketedSettings];
}
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@thaJeztah
thaJeztah / docker-examples.md
Last active January 14, 2024 02:00
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@mkhl
mkhl / DebugLog.h
Created December 8, 2008 18:14
Objective-C Logging
// Source: http://blog.mbcharbonneau.com/post/56581688/better-logging-in-objective-c
#define DebugLog(format, ...) NSLog(@"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(format), ##__VA_ARGS__])