IronQR를 ChatGPT Codex와 함께 사용하는 방법

Curtis Chau
Curtis Chau
업데이트됨: 2026년 10월 9일

QR 코드 적체량은 종종 스캔된 자산 태그, 현장 전화 사진, 팩스 복사본, 스캐너 오류로 인한 0바이트 파일, 코드가 없는 커버 시트 등을 포함하는 정리되지 않은 폴더로 도착합니다. 하나의 파일을 처리하는 단순 루프는 첫 번째 손상된 파일에서 멈추고, 실패한 이미지를 추적하지 않으며 실패의 이유를 설명하지 않습니다.

ChatGPT Codex는 OpenAI의 코딩 에이전트입니다. 이는 터미널, IDE, ChatGPT 데스크톱 앱 및 클라우드에서 하나의 ChatGPT 로그인으로 작동합니다. IronQR는 Iron Software의 .NET QR 코드 라이브러리입니다.

각 프롬프트는 Codex에 작업을 수행하고 이미지 당 하나의 행을 포함하는 결과 파일을 생성하도록 지시합니다. 배치 작업이 결과가 없는 파일을 처리할 수 있기 때문에 이 가이드에서 참조하는 모든 수치는 프롬프트에 명시된 대로 결과 파일에서 도출됩니다.

빠른 시작
NuGetNuGet으로 설치

PM > Install-Package IronQR

위 명령을 NuGet 패키지 관리자 콘솔에 입력하거나 NuGet 패키지 관리자에서 패키지를 검색하여 IronQR를 설치하십시오.

.NET 콘솔 프로젝트 내에서 Codex를 시작하여 이미지 폴더를 포함하고 배치 처리 요구 사항을 지정합니다.

$ironqr Add the IronQR package to this console project, then make Program.cs
decode every file in Backlog/sample/ with QrReader.ReadAsync. Write
out/quickstart.csv with one row per file (name, decoded value or empty, QR
type, exception type if the file threw) and print the decoded, empty, and
threw counts by reading that CSV back. Load the key out of the
IRONQR_LICENSE_KEY variable. Call Dispose() on each QrImageInput yourself
instead of a using block, which throws in IronQR 2026.10.1. Run dotnet build
and dotnet run and fix whatever fails.
Text

$ironqr 언급은 Codex가 코드를 작성하기 전에 IronQR의 기능을 로드합니다.



ChatGPT Codex란 무엇이며, 어떻게 .NET QR 코드 작업에 어울리나요?

Codex는 당신이 부여한 권한 내에서 작동합니다. 그것은 디코더를 작성하고, 이미지를 대상으로 실행하며, 출력을 읽고, 코드를 수정합니다. Codex CLI 저장소에서 npm install -g @openai/codex로 CLI를 설치하고, 터미널 사용을 위한 Codex CLI 문서를 확인하십시오.

기준치가 있는 적체량은 리뷰를 단축시킵니다. 발명이 된 멤버는 빌드에 실패하고, 잘못된 디코드는 Backlog/manifest.csv와 불일치하는 행으로 나타납니다.

에이전트는 각 배치를 다르게 구성할 수 있지만, 디코더는 주어진 이미지에 대해 모든 스레드 수에서 동일한 값을 반환해야 합니다. 그 일관성은 라이브러리에 있으며, IronQR은 적체량이 필요한 부분을 포괄합니다.

  • 한 번의 호출로 사진 및 스캔: QrScanMode.Auto 모드는 탐지 모델을 실행하고, 모델이 아무것도 찾지 못했을 때 기본 스캔으로 다시 시도합니다. 스캔 모드 가이드는 이를 두 가지 단일 패스 모드와 비교합니다.
  • 모든 결과의 심볼 유형: QrResult.QrType는 표준 QR (QrEncoding.QRCode)을 마이크로 QR 및 rMQR과 분리하여, 검증자가 자산 태그가 아닌 레이블을 거부할 수 있도록 합니다.

IronQR 프롬프트를 작성하고 Codex를 설정하는 방법은?

효과적인 IronQR 배치 프롬프트는 여섯 가지 사항을 언급합니다. 이 적체량의 입력은 Backlog/images/의 모든 PNG 및 JPEG이며, SemaphoreSlim은 --concurrency 옵션으로 크기를 조정하고 동시성을 설정하며, 출력은 파일당 하나의 행으로 out/pipeline.csv입니다. 예외를 발생시키는 파일은 배치가 계속되는 동안 행을 얻습니다. 입증은 out/sequential.csv와의 행 대 행 일치이며, 제약 조건은 새로운 패키지가 없고 기본값이 Auto라는 것입니다.

OpenAI의 환각에 대한 연구는 훈련과 평가가 추측을 보상함을 발견했으며, 배치 작업에서 추측은 보통 폐색 요약에서 총계로 나타납니다.

팁: 배치 프롬프트를 보내기 전에, 이름을 지정한 출력 파일을 찾으십시오.

Codex는 저장소의 .agents/skills 폴더에서 기능을 발견하며, 각각의 기능은 이름과 설명이 앞자리에 기재된 SKILL.md을 보유한 폴더입니다. IronQR의 skill.md를 .agents/skills/ironqr/SKILL.md로 저장하면 $ironqr 언급이 해결됩니다. Codex는 작업이 설명과 일치할 때 언급 없이도 기능을 선택할 수 있습니다.

AGENTS.md은 모든 세션이 시작할 때의 규칙을 포함합니다. Codex는 저장소 루트와 시작된 폴더 사이의 각 디렉터리에서 가장 많은 하나의 파일만 읽으며, 더 깊은 파일은 그 위의 지침을 무효화합니다. /init 명령은 하나를 초안을 작성합니다. 아래 프롬프트는 또한 IronQR의 llms.txt 인덱스를 API 참조로 지정합니다.

Create the repository's AGENTS.md with a section titled QR decoding. It
should say that IronQR (package IronQR, namespace IronQr) is the only QR
library here, that the ironqr skill in .agents/skills/ironqr/ and IronQR's
llms.txt documentation index are the API references, that the key is read
from IRONQR_LICENSE_KEY and never printed or written to a file, that
QrImageInput is disposed with an explicit Dispose() call and never a using
block, that Backlog/manifest.csv is ground truth and read-only, and that any
count, rate, or timing you report must come from a per-image results file
written in the same turn, named in your reply.
Text

IronQR를 추가하고 첫 번째 폴더를 디코드하도록 Codex에 요청하는 방법은?

Show me the IronQR PackageReference in AssetBacklog.csproj and the installed
version. Then run dotnet list package --include-transitive and quote the lines
for IronQR.Slim and Microsoft.ML.OnnxRuntime, since the detection model
depends on them. Change no package references.
Text

IronQR 패키지는 관리 API용 IronQR.Slim와 탐지용 Microsoft.ML.OnnxRuntime 및 Windows 네이티브 리더를 가져옵니다. Windows에서도 IronSoftware.ReaderInternals.Windows가 필요한 IronQR.Slim만으로 프로젝트는 여전히 기본 스캔으로 읽지만 탐지 모델은 실행할 수 없습니다. 패키지는 대문자 R로 IronQR이고 네임스페이스는 IronQr입니다. using IronQR 지시문이 컴파일 오류를 발생시킵니다. IronQR 변경 기록을 확인한 후 릴리스를 고정하세요.

IronQR은 읽기에 체험판 워터마크를 추가하지 않습니다. 라이센스가 없는 첫 번째 읽기는 "Production License Required" 메시지가 있는 LicensingException을 발생시키며, ReadAsync와 함께 태스크가 대기 상태일 때 예외가 표면화됩니다. 배치에서는 이미지당 동일한 실패 행이 됩니다.

Move the license setup into a Startup.ApplyIronQrKey method called first in
Program.cs. If IRONQR_LICENSE_KEY is unset or License.IsLicensed is false,
exit with code 2 and one clear line on stderr before any image is opened,
because IronQR throws on the first read instead of degrading. Run the program
once as is and once with the variable removed for that single command, and
report both exit codes and what IsLicensed returned.
Text

라이센스 키 페이지는 체험 키와 IronQR이 읽는 구성 파일을 포함합니다. 예외 유형은 IronQr 어셈블리에 내부적이므로 LicensingException 유형으로 포착하려고 하면 오류 CS0122로 컴파일이 실패합니다.

그 다음은 순차 디코더가 있으며, 그 결과 파일은 모든 더 빠른 모드의 기준이 됩니다.

Create Services/BacklogDecoder.cs with DecodeAsync(string path) returning an
ImageOutcome record: file, status (Decoded, Empty, Unreadable), values, QR
types, exception type and message, and milliseconds. Open the file with
AnyBitmap.FromFile, read with QrScanMode.Auto, and never let one file stop
the batch. Add a --sequential mode that runs it over Backlog/images/ one file
at a time, writes out/sequential.csv, and starts out/runs.csv with the mode
and wall time. Report the status counts and the wall time from those files.
Text

IronQR로 폴더를 병렬로 디코딩하는 방법은?

비동기 및 다중 스레딩 가이드는 반복마다 별도의 리더를 호출하는 안전한 기본값입니다. IronQR은 공유 인스턴스에 대해 명시적인 스레드 안전성을 보장하지 않습니다. 다음 프롬프트에는 Codex의 내장된 탐색기 에이전트가 있으며, 코드베이스 탐색을 위한 읽기 중심의 에이전트가 병렬 전환 전에 문서와 비교합니다.

Ask the explorer agent to answer this without editing anything. Before the
decoder goes parallel, list every QrReader, QrImageInput, and AnyBitmap that
BacklogDecoder creates or keeps, say which could be shared across threads,
and back each answer with a quote from
https://ironsoftware.com/qr/csharp/how-to/async-multithreading/ or the
ironqr skill. Flag anything the documentation leaves unstated.
Text

보정에서 하나의 리더를 32개 스레드에서 공유한 결과는 파일당 리더의 결과와 동일했습니다. 나중의 릴리스는 다를 수 있으며, 파일당 리더는 비용이 거의 들지 않습니다.

입력 객체 또한 주의가 필요합니다. 버전 2026.10.1에서, 그것을 둘러싼 using 블록은 성공적인 읽기 후에도 종료 시 NotImplementedException을 발생시키므로, 배치는 모든 좋은 이미지를 실패로 기록할 것입니다. 각 diff를 하나씩 검토하십시오.

병렬 버전의 경우 프롬프트는 자체 스레드에서 편집을 실행하는 내장된 작업자 에이전트를 지정합니다.

Have the worker agent add a --parallel mode with Parallel.ForEach,
MaxDegreeOfParallelism from a --threads option (default
Environment.ProcessorCount), and a new QrReader per file. Use the synchronous
Read inside the loop body, since Parallel.ForEach does not await an async
lambda. Write out/parallel.csv sorted by file name, then compare its status
and value columns with out/sequential.csv and fix any row that differs
before you finish. Append mode, thread count, and wall time to out/runs.csv.
Text

Parallel.ForEach에 전달된 비동기 람다는 비동기 void로 컴파일되므로 루프는 읽기가 끝나기 전에 반환되고 결과 파일은 짧게 나옵니다. 순차 파일과의 비교가 그것을 잡아냅니다.

ReadAsync로 동시 읽기를 제한하는 방법은?

병렬 루프는 읽기당 스레드를 차단합니다. ReadAsync은 SemaphoreSlim 뒤에서 일정 수의 읽기를 유지하며 호출 스레드를 자유롭게 두어, 비동기 가이드가 대량 배치에 대해 제시한 패턴입니다. 이는 IQrInput을 받아들이며 파일 경로에 대한 오버로드가 없으므로 각 태스크는 여전히 자체 비트맵을 엽니다.

Add a --pipeline mode: Task.WhenAll over every file, each task waiting on a
SemaphoreSlim sized by --concurrency and awaiting ReadAsync. Run it at
concurrency 2, 8, and Environment.ProcessorCount, writing
out/pipeline-c<N>.csv for each and appending to out/runs.csv. Confirm each
file matches out/sequential.csv row for row, then tell me which setting was
fastest according to runs.csv.
Text

탐지 모델은 이미 한 번의 읽기를 여러 코어에 분산하므로, 더 높은 제한은 더 빠르게 실행될 필요가 없습니다. 하드웨어를 위해 runs.csv이 제한을 선택하게 하고, 메모리 사용을 제한하는 데 있어 신뢰할 수 있는 세마포어를 유지하십시오.

배치에 어떤 스캔 모드를 사용해야 합니까?

탐지 모델은 기본 패스들이 놓친 사진을 읽으며, 또한 각 읽기에 소요되는 시간의 대부분을 차지합니다.

Measure what the machine learning detector costs on this backlog. Run the
pipeline at the fastest concurrency from runs.csv, first under
QrScanMode.Auto and then under QrScanMode.OnlyBasicScan, writing
out/mode-auto.csv and out/mode-basic.csv with per-image milliseconds. Join
both with the category column of Backlog/manifest.csv and report decoded
count and median milliseconds per category for each mode. If either mode
reads files the other misses, keep Auto as the default and build a single
OnlyBasicScan retry of its Empty files into the decoder for every later run.
Rerun to out/mode-fallback.csv and count the recoveries.
Text

두 모드는 모든 깨끗한 스캔 및 팩스 복사본을 읽고, 각자는 서로 다른 전화 사진 몇 개를 놓쳤습니다. 기본 패스만 읽은 사진에서 탐지 모델은 코드를 찾고 디코드할 수 없었으므로 Auto는 결코 되돌아가지 않았습니다. 빈 파일을 QrScanMode.OnlyBasicScan로 다시 시도하여 모든 사진을 복구했습니다.

디코딩된 값을 검증하고 실패를 보고하는 방법은?

배치는 세 가지 유형의 실패에 직면하며 각 코드는 다르게 보입니다.

입력결과상태
빈, 잘린 또는 이미지가 아닌 파일이미지 로드는 IronQR이 실행되기 전에 예외를 던집니다.읽을 수 없음
코드가 없거나 오류 수정을 넘어선 손상빈 콜렉션, 결코 null이 아님빈
탐지 전용 모드에서 읽은 모든 코드모서리 점, 빈 Value, QrEncoding.None의 QrType비어 있음, 디코드되지 않음

세 번째 행이 위험한 것입니다. 첫 번째 순차 디코더는 어떤 결과가 반환되었는지만 확인했기 때문에 이를 디코드된 것으로 계산했을 것입니다.

Backlog/README.md defines a valid asset tag. Add Services/TagValidator.cs and
apply it after each read: a decode only counts when the symbol is a standard
QR code (QrEncoding.QRCode), the value matches the documented pattern, and
the Luhn check digit holds. Give the others the statuses WrongSymbol,
InvalidFormat, or BadCheckDigit. Rerun the pipeline to out/validated.csv and
list every file whose status disagrees with expected_status in the manifest.
Text

체크 디지트는 데이터의 일부이므로 IronQR이 이를 검증할 수 없습니다. 체크섬 및 내결함성 가이드가 설명하는 대로 읽기 내의 Reed-Solomon 보정은 상징이 디코드되었음을 증명하지만, 결과는 신뢰 속성을 포함하지 않습니다. 잘못된 체크 디지트를 가진 태그는 깨끗하게 스캔되지만 여전히 유효하지 않습니다.

IronQR의 오류 메시지 가이드는 다음 프롬프트가 전체 적체량에 적용하는 파일 별 로깅 패턴을 보여줍니다.

Every file that is not Decoded needs a recorded reason. Write one JSON line
per file to out/decode-log.jsonl (file, status, exception type, message,
milliseconds), send IronQR's own log to out/ironqr-debug.log through
IronQr.Logging.Logger, and generate out/failures.md from the JSONL only: one
section per status other than Decoded, a count, and every file name. Then
check the section counts against out/validated.csv.
Text

버전 2026.10.1에서는 IronQr.Logging.Logger 로그가 탐지 스캔과 같은 기계 학습 모델을 사용한 각 읽기에 걸린 경로를 기록합니다. 보고서는 JSONL에서만 만들어지기 때문에, 디코더가 기록하지 않은 실패는 결과 파일과 불일치하는 수치로 나타납니다.

디코드되지 않는 이미지를 진단하는 방법은?

Codex는 그림을 볼 수 있습니다. 파일을 codex --image과 세션을 시작하거나 작곡자에 붙여 넣습니다.

I attached IMG_0018.png from Backlog/images/ with codex --image. The pipeline
marks it Empty. Look at the picture and tell me whether it is a damaged code,
a page with no code, or a capture problem a rescan would fix. Then test your
answer: read it with all three QrScanMode values and write
out/retry-IMG_0018.csv. Do not change the pipeline.
Text

우리 실행에서, 모든 세 모드는 이 파일에 대해 비어 있는 상태로 돌아왔고, 보정에서 탐지 모델은 찾을 것이 아무것도 없었습니다. 코드 자체가 손상되어 손실은 오류 수정을 초과하며, 다른 읽기나 동일한 레이블의 재스캔은 이를 변경하지 않습니다. 수정은 대체 레이블이며, 레이블을 직접 인쇄하는 경우에는 더 높은 오류 수정 수준입니다.

오류가 있는 배치 출력을 끝에서 끝까지 디버그하는 방법은 무엇인가요?

Send the explorer agent into Jobs/NightlyImport.cs and Logs/nightly-2026-10-06/
before anything is edited. That run reported six unreadable files and no other
failure, yet Backlog/archive-index-gaps.csv lists assets the archive never
received. Find what the missing assets have in common, explain why the job
counted them as successes, and propose the smallest fix together with the
command that would prove it. Put the findings in out/nightly-diagnosis.md and
change no code.
Text

수정 전에 진단을 승인하십시오. 좋은 것은 성공을 결정하는 줄을 인용합니다. 제안된 수정을 out/mode-fallback.csv에도 대조하십시오.

1회성 코드를 재사용 가능한, 테스트된 구성요소로 어떻게 변환하나요?

Put the worker agent on folding the modes into a BacklogJob class. Add the
Microsoft.Extensions.DependencyInjection package, register the job with it,
and configure it with a BacklogOptions record (input folder, concurrency,
scan mode, output folder). Keep the validator, the basic-scan retry, and the
logging in it, stay under 160 lines, and add XML doc comments. Before
finishing, run it over Backlog/images/ into out/final.csv and confirm every
row agrees with the manifest's expected_status and expected_value.
Text

리팩터링은 빌드 오류 없이 검증자, 기본 스캔 재시도 또는 파일 별 리더를 제거할 수 있습니다. 전체 실행을 기준치와 대조하는 것만이 이를 잡아냅니다.

Add an xUnit project, AssetBacklog.Tests, and cover BacklogJob with tests
that read real files from Backlog/images/: a clean scan decodes to its
manifest value, the zero-byte file comes back Unreadable without throwing, a
damaged image is Empty, a Micro QR label is WrongSymbol, a bad check digit is
BadCheckDigit, and a parallel run over 40 files matches a sequential one.
Assert on status and value. Run dotnet test and report the totals it prints.
Text

매니페스트는 상태와 가치를 수정하며, 타이밍은 실행할 때마다 다릅니다.

반복적인 IronQR 질문을 저장소 기능에 유지하십시오. OpenAI의 사용자 지정 프롬프트 페이지는 오래된 ~/.codex/prompts 폴더를 기능에 비해 폐기된 것으로 표시합니다.

$ironqr Using the IronQR API reference, list every member of QrResult and say
whether IronQR reports a confidence or checksum score for a read. Then point
to the line in BacklogJob that decides a file is Decoded.
Text

우리 실행에서, Codex는 결과의 네 멤버를 나열하고 Decoded를 작업에서 디코더를 통해 이를 반환하는 유효화자 줄까지 추적했습니다.

다른 이미지 폴더에서 이러한 프롬프트를 재사용하는 방법은?

경로만 변경하면 위의 모든 프롬프트가 그대로 실행됩니다. AI 코딩 보조 도구 가이드는 단일 수락 프롬프트를 처음부터 끝까지 실행하고 결과를 발행합니다.

실제 실행에서 프롬프트가 무엇을 생성했습니까?

우리는 위의 모든 프롬프트를 하나의 스레드에서, 샘플 저장소에 대해 순서대로 Codex에 보냈습니다. 그것은 콘솔 애플리케이션과 301개의 이미지(깨끗한 스캔, 전화 사진, 팩스 복사본, 손상된 라벨, 빈 커버 시트, 마이크로 QR 선반 라벨, 유효하지 않은 태그 및 이미지가 아닌 6개의 파일)의 적체량을 보유하고 있으며, 각각의 예상 상태와 가치를 가진 매니페스트가 있습니다. 세션 후 프로젝트를 Release에서 다시 빌드하고 테스트를 실행했습니다. 아래 결과를 확인하기 위해 모든 이미지를 독립적으로 디코딩했습니다.

  • 기본 스캔 재시도는 Decoded를 256에서 264로 증가시켰습니다. 그전에는 각각의 모드가 301 중 256을 디코드했고, 두 모드 간에 16개의 파일이 달랐습니다.
  • 깨끗한 스캔은 Auto에서 360ms 중앙값을 기록했고 기본 스캔에서 35ms를 기록했으며, 이는 제한 2에서 전체 적체량을 7초 만에 완료했습니다.
  • 순차 디코더는 71초 동안 256 Decoded, 39 Empty 및 6 Unreadable을 기록했습니다.
  • 병렬 모드는 60초 동안 32개의 스레드에서 동일한 301개의 행을 기록했고, 파이프라인은 제한 2, 8 및 32에서 55, 66 및 68초 동안 이를 기록했습니다.
  • 빠른 시작에서는 12행 중 9행이 디코드되었고, 2개는 비어 있고 1개는 0바이트 파일이 예외를 던졌습니다.
  • 검증은 240 Decoded, 31 Empty, 8 WrongSymbol, 8 InvalidFormat, 8 BadCheckDigit 및 6 Unreadable과 매니페스트와 일치했습니다.
  • 실패 보고서는 실패한 파일당 1개씩 61개의 레코드를 포함했습니다.
  • 리팩터링 후, 64행 작업은 301 중 301행에서 매니페스트와 일치했고, 6개의 테스트 중 6개가 다시 한 번 Release에서 통과했습니다.
  • 모든 16개의 프롬프트가 각 빌드를 통과하며 수동 코드 편집 없이 실행되었습니다. 13에서 16까지의 프롬프트가 무료 플랜 사용 한도에 도달했고 Codex에 다시 로그인한 후 동일한 스레드에서 재개되었습니다.
  • 조사 프롬프트 전에, 심어진 오류와 함께 야간 작업, 로그 및 간격 목록을 추가했습니다. Codex는 사진 JPEG에서 탐지 전용 모드와 모든 결과를 수용하는 성공 검사를 찾았습니다.

Codex의 버전, 모델, 타이밍 및 이 실행을 위한 테스트 기계는 공유 실행 기록에 있습니다.


문제 해결


질문?

질문이 있으시면 support@ironsoftware.com으로 문의하세요.

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

더 읽기

시작할 준비 되셨나요?

NuGet 다운로드 수 82,442버전:2026.11방금 출시