1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
silica-viewer/Dependencies/PSDWriter/Documentation/Categories/NSData+PSDAdditions.html

367 lines
9.9 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>NSData(PSDAdditions) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.0.5 (build 759)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">PSDWriter Documentation </a></h1>
<a id="developerHome" href="../index.html">Foundry376</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">NSData(PSDAdditions) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/packedBitsDescription">&nbsp;&nbsp;&nbsp;&nbsp;- packedBitsDescription</option>
<option value="//api/name/packedBitsForRange:skip:">&nbsp;&nbsp;&nbsp;&nbsp;- packedBitsForRange:skip:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/packedBitsDescription">packedBitsDescription</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/packedBitsForRange:skip:">packedBitsForRange:skip:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="NSData(PSDAdditions) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">NSData(PSDAdditions) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">NSDataPSDAdditions.h<br />NSDataPSDAdditions.m</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/packedBitsDescription">&ndash;&nbsp;packedBitsDescription</a></code>
<span class="tooltip"><p>Takes packedBits data and prints out a description of the packed contents by
running the decode operation and explaining via NSLog how the data is being
decoded. Useful for checking that packedBits data is correct.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/packedBitsForRange:skip:">&ndash;&nbsp;packedBitsForRange:skip:</a></code>
<span class="tooltip"><p>A special version of packedBits which will take the data and pack every nth
value.</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/packedBitsDescription" title="packedBitsDescription"></a>
<h3 class="subsubtitle method-title">packedBitsDescription</h3>
<div class="method-subsection brief-description">
<p>Takes packedBits data and prints out a description of the packed contents by
running the decode operation and explaining via NSLog how the data is being
decoded. Useful for checking that packedBits data is correct.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)packedBitsDescription</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Takes packedBits data and prints out a description of the packed contents by
running the decode operation and explaining via NSLog how the data is being
decoded. Useful for checking that packedBits data is correct.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSDataPSDAdditions.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/packedBitsForRange:skip:" title="packedBitsForRange:skip:"></a>
<h3 class="subsubtitle method-title">packedBitsForRange:skip:</h3>
<div class="method-subsection brief-description">
<p>A special version of packedBits which will take the data and pack every nth
value.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSData *)packedBitsForRange:(NSRange)<em>range</em> skip:(int)<em>skip</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>skip:</em></dt>
<dd><p>The number of bytes to advance as the data is encoded. Skip = 1 will
encode every byte, skip = 4 will encode every fourth byte, and so on.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>range:</em></dt>
<dd><p>The range within the data object that should be encoded. Useful
for specifying a non-zero starting offset to get a certain channel encoded.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>A special version of packedBits which will take the data and pack every nth
value.</p>
<p>This is important for <a href="../Classes/PSDWriter.html">PSDWriter</a> because it&rsquo;s necessary to encode R, then G,
then B, then A data &ndash; so we essentially start at offset 0, skip 4, then do offset 1,
skip 4, etc&hellip; to compress the data with very minimal memory footprint.</p>
<p>For normal packbits just to skip = 1</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSDataPSDAdditions.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2012 Foundry376. All rights reserved. (Last updated: 2012-03-08)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 759)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
</script>
</body>
</html>