ImageMagick 및 Ghostscript를 사용하여 TIFF 이미지에서 PDF 파일을 만듭니다.Ghostscript 및 ImageMagick을 사용하여 채널당 16 비트 (48 비트) TIFF 이미지를 PDF 또는 PDF/A로 변환하십시오.
내 소스 티파니는 채널 당 16 비트이고 첨부 된 ICC 프로파일 (AdobeRGB)이있는 알파 (48 비트 이미지)가 없으므로이 파일을 최종 PDF로 유지하려고합니다.
convert input.tif[0] -density 600 -alpha Off -size 5809x9408 -depth 16 intermediate.ps
이것은 내 입력 TIFF 이미지 (다만, 주 화상 및 [0]을 사용하지 통하여 섬네일) 및 비트 맵으로부터 생성하는 파일 .PS 걸린다.
포스트 스크립트 파일의 크기를 보면 소스 TIFF와 대략 같은 크기 (328MB tiff보다 3 ~ 4MB 더 큼)이지만 .ps의 이미지 데이터 채널당 8 또는 16 비트입니다.
그런 다음 GhostScript를 사용하여 이것을 PDF로 변환하면 PDF에서 채널당 8 비트를 얻게됩니다.
gs -dPDFA=1 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sDefaultRGBProfile=AdobeRGB1998.icc -dOverrideICC -sOutputFile=output.pdf -r600 -P PDFA_def.ps -f custom.joboptions intermediate.ps
pdfimages를 사용하여 PDF를 검사하면 채널 당 8 비트를 표시합니다.
%!
% This is a sample prefix file for creating a PDF/A document.
% Feel free to modify entries marked with "Customize".
% This assumes an ICC profile to reside in the file (ISO Coated sb.icc),
% unless the user modifies the corresponding line below.
% Define entries in the document Info dictionary :
/ICCProfile (AdobeRGB1998.icc) % Customise
def
[ /Title (Title) % Customise
/DOCINFO pdfmark
% Define an ICC profile :
[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark
[{icc_PDFA}
<<
/N currentpagedevice /ProcessColorModel known {
currentpagedevice /ProcessColorModel get dup /DeviceGray eq
{pop 1} {
/DeviceRGB eq
{3}{4} ifelse
} ifelse
} {
(ERROR, unable to determine ProcessColorModel) == flush
} ifelse
>> /PUT pdfmark
[{icc_PDFA} ICCProfile (r) file /PUT pdfmark
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
[{OutputIntent_PDFA} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFA1 % Must be so (the standard requires).
/DestOutputProfile {icc_PDFA} % Must be so (see above).
/OutputConditionIdentifier (sRGB) % Customize
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
나는 또한 custom.joboptions 파일을 가지고 : 내 PDFA_def.ps의
pdfimages -list output.pdf
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 5809 9408 rgb 3 8 image no 10 0 600 600 74.1M 47%
내용은 고스트 스크립트는 컬러 프로파일로 (1998)에서 AdobeRGB를 지정하는 기본 설치에서 수정되었습니다 Acrobat Distiller에서 만든 다음 PDF/A 호환을 위해 수정했습니다.이 파일에서도 16 비트 이미지를 강제 적용하려고 시도했지만 여전히 PDF에서 8 비트 이미지를 얻고 있습니다.
고스트 스크립트가 사용하는 옵션의 수와 무시할 수있는 옵션의 수를 알 수는 없습니다. PDF를 만들 때이 custom.joboptions 파일을 사용하지 않으면 이미지가 매우 낮은 해상도로 다운 샘플링됩니다. 컴포넌트 당 16 비트를 처리 할 수
<<
/ASCII85EncodePages false
/AllowTransparency false
/AutoPositionEPSFiles true
/AutoRotatePages /All
/Binding /Left
/CalGrayProfile (Dot Gain 20%)
/CalRGBProfile (sRGB IEC61966-2.1)
/CalCMYKProfile (U.S. Web Coated \050SWOP\051 v2)
/sRGBProfile (sRGB IEC61966-2.1)
/CannotEmbedFontPolicy /Error
/CompatibilityLevel 1.4
/CompressObjects /Off
/CompressPages true
/ConvertImagesToIndexed true
/PassThroughJPEGImages true
/CreateJobTicket false
/DefaultRenderingIntent /Default
/DetectBlends true
/DetectCurves 0.0000
/ColorConversionStrategy /LeaveColorUnchanged
/DoThumbnails false
/EmbedAllFonts true
/EmbedOpenType false
/ParseICCProfilesInComments true
/EmbedJobOptions false
/DSCReportingLevel 0
/EmitDSCWarnings false
/EndPage -1
/ImageMemory 1048576
/LockDistillerParams true
/MaxSubsetPct 100
/Optimize false
/OPM 1
/ParseDSCComments true
/ParseDSCCommentsForDocInfo true
/PreserveCopyPage true
/PreserveDICMYKValues true
/PreserveEPSInfo true
/PreserveFlatness true
/PreserveHalftoneInfo false
/PreserveOPIComments false
/PreserveOverprintSettings false
/StartPage 1
/SubsetFonts false
/TransferFunctionInfo /Apply
/UCRandBGInfo /Remove
/UsePrologue false
/ColorSettingsFile (None)
/AlwaysEmbed [ true
]
/NeverEmbed [ true
]
/AntiAliasColorImages false
/CropColorImages true
/ColorImageMinResolution 600
/ColorImageMinResolutionPolicy /OK
/DownsampleColorImages false
/ColorImageDownsampleType /Average
/ColorImageResolution 600
/ColorImageDepth -1
/ColorImageMinDownsampleDepth 16
/ColorImageDownsampleThreshold 1.50000
/EncodeColorImages true
/ColorImageFilter /FlateEncode
/AutoFilterColorImages false
/ColorImageAutoFilterStrategy /JPEG
/ColorACSImageDict <<
/QFactor 0.15
/HSamples [1 1 1 1] /VSamples [1 1 1 1]
>>
/ColorImageDict <<
/QFactor 0.15
/HSamples [1 1 1 1] /VSamples [1 1 1 1]
>>
/JPEG2000ColorACSImageDict <<
/TileWidth 256
/TileHeight 256
/Quality 30
>>
/JPEG2000ColorImageDict <<
/TileWidth 256
/TileHeight 256
/Quality 30
>>
/AntiAliasGrayImages false
/CropGrayImages true
/GrayImageMinResolution 300
/GrayImageMinResolutionPolicy /OK
/DownsampleGrayImages false
/GrayImageDownsampleType /Average
/GrayImageResolution 600
/GrayImageDepth -1
/GrayImageMinDownsampleDepth 2
/GrayImageDownsampleThreshold 1.50000
/EncodeGrayImages true
/GrayImageFilter /FlateEncode
/AutoFilterGrayImages false
/GrayImageAutoFilterStrategy /JPEG
/GrayACSImageDict <<
/QFactor 0.15
/HSamples [1 1 1 1] /VSamples [1 1 1 1]
>>
/GrayImageDict <<
/QFactor 0.15
/HSamples [1 1 1 1] /VSamples [1 1 1 1]
>>
/JPEG2000GrayACSImageDict <<
/TileWidth 256
/TileHeight 256
/Quality 30
>>
/JPEG2000GrayImageDict <<
/TileWidth 256
/TileHeight 256
/Quality 30
>>
/AntiAliasMonoImages false
/CropMonoImages true
/MonoImageMinResolution 1200
/MonoImageMinResolutionPolicy /OK
/DownsampleMonoImages false
/MonoImageDownsampleType /Average
/MonoImageResolution 2400
/MonoImageDepth -1
/MonoImageDownsampleThreshold 1.50000
/EncodeMonoImages true
/MonoImageFilter /CCITTFaxEncode
/MonoImageDict <<
/K -1
>>
/AllowPSXObjects false
/CheckCompliance [
/PDFA1B:2005
]
/PDFX1aCheck false
/PDFX3Check false
/PDFXCompliantPDFOnly true
/PDFXNoTrimBoxError false
/PDFXTrimBoxToMediaBoxOffset [
0.00000
0.00000
0.00000
0.00000
]
/PDFXSetBleedBoxToMediaBox true
/PDFXBleedBoxToTrimBoxOffset [
0.00000
0.00000
0.00000
0.00000
]
/PDFXOutputIntentProfile (Adobe RGB \0501998\051)
/PDFXOutputConditionIdentifier()
/PDFXOutputCondition()
/PDFXRegistryName()
/PDFXTrapped /False
/CreateJDFFile false
>> setdistillerparams
<<
/HWResolution [600 600]
/PageSize [697.080 1128.960]
>> setpagedevice
이 정보를 제공해 주셔서 감사합니다. 매우 도움이됩니다. ImageMagick 및 Ghostscript가있는 PostScript를 사용하는 것보다 채널당 하나의 TIFF에서 PDF로 16 비트 변환하는 더 좋은 방법이 있습니까? –
직접 PDF 가능 이미지 응용 프로그램이 필요합니다. 어도비 포토샵이 마음에 떠오르지 만, 필자의 사본이 오히려 노인이기 때문에 확신 할 수 없다 ..... 나는 미안하다. 내가 할 수있는 오픈 소스 도구를 모른다. – KenS