Module: Depix

Included in:
RdocExplainer
Defined in:
lib/depix.rb,
lib/depix/dict.rb,
lib/depix/enums.rb,
lib/depix/editor.rb,
lib/depix/reader.rb,
lib/depix/structs.rb,
lib/depix/compact_structs.rb

Defined Under Namespace

Modules: Synthetics Classes: ArrayField, CharField, CompactDPX, DPX, Dict, Editor, Field, FileInfo, Filler, FilmInfo, ImageElement, ImageInfo, InnerField, InvalidHeader, OrientationInfo, R32Field, Reader, TelevisionInfo, U16Field, U32Field, U8Field, UserInfo

Constant Summary collapse

VERSION =
'1.1.5'
COLORIMETRIC =
{
    :UserDefined => 0,
    :PrintingDensity => 1,
    :Linear => 2,
    :Logarithmic => 3,
    :UnspecifiedVideo => 4,
    :SMTPE_274M => 5,
    :ITU_R709 => 6,
    :ITU_R601_625L => 7,
    :ITU_R601_525L => 8,
    :NTSCCompositeVideo => 9,
    :PALCompositeVideo => 10,
    :ZDepthLinear => 11,
    :DepthHomogeneous => 12
}
COMPONENT_TYPE =
{
  :Undefined => 0,
  :Red => 1,
  :Green => 2,
  :Blue => 3,
  :Alpha => 4,
  :Luma => 6,
  :ColorDifferenceCbCr => 7,
  :Depth => 8,
  :CompositeVideo => 9,
  :RGB => 50,
  :RGBA => 51,
  :ABGR => 52,
  :CbYCrY422 => 100,
  :CbYACrYA4224 => 101,
  :CbYCr444 => 102,
  :CbYCrA4444 => 103,
  :UserDef2Element => 150,
  :UserDef3Element => 151,
  :UserDef4Element => 152,
  :UserDef5Element => 153,
  :UserDef6Element => 154,
  :UserDef7Element => 155,
  :UserDef8Element => 156,
}
CompactInfo =
FileInfo.only(
  :magic,
  :ditto_key,
  :filename,
  :timestamp 
)
CompactFilmInfo =
FilmInfo.only(
  :offset,
  :count,
  :frame_position,
  :frame_id,
  :slate
)
CompactOrientation =
OrientationInfo.only(
  :filename,
  :timestamp
)
CompactTelevision =
TelevisionInfo.only(
  :time_code,
  :user_bits,
  :field_number
)

Class Method Summary collapse

Class Method Details

.describe_brief(path) ⇒ Object

Return a formatted description of the DPX file at path, showing only synthetic attributes



102
103
104
# File 'lib/depix.rb', line 102

def self.describe_brief(path)
  Reader.new.describe_synthetics_of_struct(from_file(path))
end

.describe_file(path, compact = false) ⇒ Object

Retrurn a formatted description of the DPX file at path. Empty values are omitted.



97
98
99
# File 'lib/depix.rb', line 97

def self.describe_file(path, compact = false)
  Reader.new.describe_file(path, compact)
end

.from_file(path, compact = false) ⇒ Object

Return a DPX object describing a file at path. The second argument specifies whether you need a compact or a full description



86
87
88
# File 'lib/depix.rb', line 86

def self.from_file(path, compact = false)
  Reader.new.from_file(path, compact)
end

.from_string(string, compact = false) ⇒ Object

Return a DPX object describing headers embedded at the start of the string. The second argument specifies whether you need a compact or a full description



92
93
94
# File 'lib/depix.rb', line 92

def self.from_string(string, compact = false)
  Reader.new.parse(string, compact)
end