前記事の続編です。 doratex.hatenablog.jp 前記事では,写真に写る人物の顔部分に絵文字を貼り込むことでマスキングを行いました。本記事では,その応用として,顔部分にモザイクをかけるスクリプトを作ってみましょう。 前記事同様,次のような要件とします。 要件 macOS のデフォルト状態で動作する。ユーザに対して,事前に何らかのツールをインストールしておくな...| TeX Alchemist Online
SNS上に写真をアップするとき,個人情報保護のため,人物の顔に絵文字で上記のようなマスキング処理を施すことがよくあります。そこで,次の条件を満たすシェルスクリプトを作ることを目指します。 要件 macOS のデフォルト状態で動作する。ユーザに対して,事前に何らかのツールをインストールしておくなどの準備を要求しない。 コマンドラインから使えるシェ...| TeX Alchemist Online
前回の記事では,macOS のデフォルト状態でコマンドラインからPDFや画像ファイルに対してOCR処理を行いテキストを取り出す方法を解説しました。 doratex.hatenablog.jp 一方,OCRではなく,「PDFに埋め込まれたテキスト情報をそのまま読み込んで標準出力に表示する」だけなら,もっと簡単なコードで済みます。 完成形のシェルスクリプト A shell script to extract text from PDF on macOS ...| TeX Alchemist Online
【追記】この記事を macOS 12.3 以降の環境に対応させた記事を書きました。 doratex.hatenablog.jp id:acetaminophen さんが,Windows環境でPDFのページ数をカウントするバッチファイルを,様々な手法で実装する試みをなされています。 d.hatena.ne.jp d.hatena.ne.jp そこで,Mac環境についても,コマンドラインからPDFのページ数をカウントする様々な手法をまとめておこうと思います。 目次 ...| TeX Alchemist Online
Quick reference of key Objective-C concepts.| iOS development by tanaschita.com
Our design system1 provides colors for three different contexts: background, foreground, and borders. Each color can exist in four different states: normal, hovered, disabled, and pressed. Historically, we modeled this using a UIColor subclass that exposed properties for different states. When the instance was used as is, it implicitly represented the normal variant. While this approach was convenient—since developers never had to manually reference the normal state—it had trade-offs. As ...| Marcel Voss
Discover the latest Swift updates, from Objective-C compatibility improvements to metatype keypaths, trailing commas, and new compiler controls—plus a must-have app for tracking proposals!| FlineDev Blog – Insights on Swift, Xcode, and Apple Development
Recently, I saw this article regarding ObjCs "end of life" from JetBrains. The tiobe index seems to disagree. It’s also important to reme...| heronsperch.blogspot.com
macOS 12 Monterey では,OSビルトインでのOCR機能が搭載されました。Preview.app で,画像やスキャンPDF(中身がスキャン画像のPDF)に対して,ただマウスでドラッグするだけで,中身の文字を認識して選択し,コピーできるようになっています。さらに,macOS 13 Ventura では,それが日本語にも対応しました。 たとえば,(今や入手困難となってしまった)The TeXbook のアスキーに...| TeX Alchemist Online
前記事の続編です。 doratex.hatenablog.jp かつては Automator アクションに内蔵されたスクリプトが便利だった macOS 12.2 以前では,システム標準にインストールされているAutomatorアクションの中に内包された Python スクリプトを呼び出すことで,コマンドラインから複数のPDFを結合することが可能でした。 例えば,input1.pdf ~input3.pdf を結合して output.pdf を得たい場合,次のコマ...| TeX Alchemist Online
A problem commonly encountered when using open-source iOS frameworks is the lack of a fully-functional framework facility in xCode. Part of the issue is that Apple does not allow dynamic linking on…| Johannes Rudolph's Blog
With the release of macOS Catalina in October, Apple rolled out a set of interesting new features collectively called System Extensions. System Extensions are a set of user space frameworks encouraging developers who currently maintain and ship kernel extensions to move their features to user space for increased security and stability. One of these new frameworks is the Endpoint Security framework. As a security researcher this framework is of special interest. It’s intended to provide a pu...| Scott Knight
When you want to detect the type of available connections on an iPhone, the best resource you can find on the web is the sample code from Erica Sadun’s excellent iPhone Cookbook book (which I…| Johannes Rudolph's Blog
macOS のコマンドラインからPDFのページ数をカウントするには Python (PyObjC) が最も汎用的だった かつて,コマンドラインからPDFのページ数をカウントする方法を色々模索しました。 doratex.hatenablog.jp このとき,結論としては「Python (PyObjC) を使う」という方法が最も汎用的(あらゆる macOS 環境下で追加ツールをインストールせず実行できる)という結果になりました。 macOS ...| TeX Alchemist Online