Exporting toImages
1Sizeis
1x2^BitsPerSample
or
3x2^BitsPerSample
.
Table2: ValidSampleFormatValuesforBitsPerSampleSettings
BitsPerSample
SampleFormat
MATLABDataType
1
Uint
logical
8
Uint
,
Int
uint8
,
int8
16
Uint
,
Int
uint16
,
int16
32
Uint
,
Int
,
IEEEFP
uint32
,
int32
,
single
64
IEEEFP
double
Table3: ValidSampleFormatValuesforBitsPerSampleandPhotometricCombinations
BitsPerSample Values
Photometric
Values
1
8
16
32
64
MinIsWhite
Uint
Uint/Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
MinIsBlack
Uint
Uint/Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
RGB
Uint
Uint
Uint
IEEEFP
IEEEFP
Pallette
Uint
Uint
Mask
Uint
Separated
Uint
Uint
Uint
IEEEFP
IEEEFP
YCbCr
Uint
Uint
Uint
IEEEFP
IEEEFP
CIELab
Uint
Uint
ICCLab
Uint
Uint
ITULab
Uint
Uint
3-73
Pdf markup text size - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
advanced pdf compressor online; change paper size pdf
Pdf markup text size - VB.NET PDF File Compress Library: Compress reduce PDF size in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Compression and Decompression Control SDK
batch pdf compression; change font size pdf
3
ExportingData
Table4:ValidSampleFormatValuesforBitsPerSampleandCompressionCombinations
BitsPerSample Values
Compression
Values
1
8
16
32
64
None
Uint
Uint
Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
CCITTRLE
Uint
CCITTFax3
Uint
CCITTFax4
Uint
LZW
Uint
Uint
Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
JPEG
Uint
Int
CCITTRLEW
Uint
PackBits
Uint
Uint
Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
Deflate
Uint
Uint
Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
AdobeDeflate Uint
Uint
Int
Uint
Int
Uint
Int
IEEEFP
IEEEFP
Table5: ValidSamplesPerPixelValuesforPhotometricSettings
Photometric Values
SamplesPerPixel1
MinIsWhite
1+
MinIsBlack
1+
RGB
3+
3-74
C# PDF Annotate Library: Draw, edit PDF annotation, markups in C#.
Provide users with examples for adding text box to PDF and edit font size and color in text box field in C#.NET program. C#.NET: Draw Markups on PDF File.
change font size in pdf text box; change font size in pdf
C# PDF insert text Library: insert text into PDF content in C#.net
Powerful .NET PDF edit control allows modify existing scanned PDF text. Ability to change text font, color, size and location and output a new PDF document.
change font size pdf text box; pdf change font size
Exporting toImages
Table5: ValidSamplesPerPixel l ValuesforPhotometric Settings
(Continued)
Photometric Values
SamplesPerPixel1
Pallette
1
Mask
1
Separated
1+
YCbCr
3
CIELab
3+
ICCLab
3+
ITULab
3+
1Whenyouspecifymorethantheexpectednumberofsamplesperpixel(n+),
youmustsetthe
ExtraSamples
tagaccordingly.
3-75
C# PDF File Split Library: Split, seperate PDF into multiple files
Divide PDF file into multiple files by outputting PDF file size. Split PDF document by PDF bookmark and outlines. Split PDF file by output file size.
change font size pdf fillable form; pdf page size
VB.NET PDF File Split Library: Split, seperate PDF into multiple
Divide PDF file into multiple files by outputting PDF file size. Split Split PDF File by Output File Size Demo Code in VB.NET. This
pdf file size limit; change font size in fillable pdf
3
ExportingData
ExportingtoAudioandVideo
Inthis section...
“ExportingtoAudioFiles”onpage3-76
“ExportingVideotoAVIFiles”onpage3-76
ExportingtoAudioFiles
InMATLAB,audiodataissimplynumericdatathatyoucanexportusing
standardMATLABdataexportfunctions,suchas
save
.
MATLABalsoincludesfunctionsthatwriteaudiodatatofilesinspecific
fileformats:
auwrite
—ExportssounddatainAUfileformat
wavwrite
—ExportssounddatainWAVfileformat
ExportingVideotoAVIFiles
TocreateanAudio/VideoInterleaved(AVI)filefromMATLABgraphics
animationsorfromstillimages,followthesesteps:
1
Createa
VideoWriter
objectbycallingthe
VideoWriter
function. For
example:
myVideo = = VideoWriter('myfile.avi');
Bydefault,
VideoWriter
preparestocreateanAVIfileusingMotionJPEG
compression.Tocreateanuncompressedfile,specifythe
Uncompressed
AVI
profile,asfollows:
myVideo = = VideoWriter('myfile.avi', 'Uncompressed d AVI');
2
Optionally,adjusttheframerate(numberofframestodisplaypersecond)
orthequalitysetting(apercentagefrom0through100).Forexample:
myVideo.FrameRate = = 15;
% Default 30
myVideo.Quality = = 50;
% Default 75
3-76
C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
Using this C#.NET PDF to JPEG conversion library component toolkit, C# developers can easily and quickly convert a large-size multi-page PDF document to a
acrobat compress pdf; pdf compression settings
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
zoomValue, The magnification of the original PDF page size. 0.1f
change page size of pdf document; best compression pdf
ExportingtoAudioandVideo
Note Qualitysettingsonlyapplytocompressedfiles. Higherquality
settingsresultinhighervideoquality,butalsoincreasethefilesize.Lower
qualitysettingsdecreasethefilesizeandvideoquality.
3
Openthefile:
open(myVideo);
Note Afteryoucall
open
,youcannotchangetheframerateorquality
settings.
4
Writeframes,stillimages,oranexistingMATLABmovietothefile
bycalling
writeVideo
. Forexample,supposethatyouhavecreateda
MATLABmoviecalled
myMovie
.Writeyourmovietoafile:
writeVideo(myVideo, myMovie);
Alternatively,
writeVideo
acceptssingleframesorarraysofstillimages
asthesecondinputargument.Formoreinformation,seethe
writeVideo
referencepage.
5
Closethefile:
close(myVideo);
3-77
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
PDF document, keeps the elements (like images, tables and chats) of original PDF file and maintains the original text style (including font, size, color, links
pdf reduce file size; change font size in pdf form field
C# Convert: PDF to Word: How to Convert Adobe PDF to Microsoft
Support fast Word and PDF conversion with original document page size remained. Microsoft Office Word 2003 (.doc) and 2007 (.docx) versions are available.
change page size pdf acrobat; pdf change font size in textbox
3
ExportingData
ExportingBinaryDatawithLow-LevelI/O
Inthis section...
“Low-LevelFunctionsforExportingData”onpage3-78
“WritingBinaryDatatoaFile”onpage3-79
“OverwritingorAppendingtoanExistingFile”onpage3-79
“CreatingaFileforUseonaDifferentSystem”onpage3-81
“OpeningFileswithDifferentCharacterEncodings”onpage3-82
“WritingandReadingComplexNumbers”onpage3-83
Low-LevelFunctionsforExportingData
Low-levelfileI/Ofunctionsallowthemostdirectcontroloverreadingor
writingdatatoafile. However,thesefunctionsrequirethatyouspecify
moredetailedinformationaboutyourfilethantheeasier-to-usehigh-level
functions.Foracompletelistofhigh-levelfunctionsandthefileformatsthey
support,see“SupportedFileFormats”onpage1-2.
Ifthehigh-levelfunctionscannotexportyourdata,useoneofthefollowing:
fprintf
,whichwritesformatteddatatoatextorASCIIfile;thatis,a
fileyoucanviewinatexteditororimportintoaspreadsheet. Formore
information,see“WritingtoTextDataFileswithLow-LevelI/O”onpage
3-12.
fwrite
,whichwritesastreamofbinarydatatoafile. Formore
information,see“WritingBinaryDatatoaFile”onpage3-79.
Note Thelow-levelfileI/OfunctionsarebasedonfunctionsintheANSI
StandardCLibrary.However,MATLABincludesvectorizedversionsofthe
functions,toreadandwritedatainanarraywithminimalcontrolloops.
3-78
Exporting Binary Data withLow-LevelI/O
WritingBinaryDatatoaFile
Usethe
fwrite
functiontoexportastreamofbinarydatatoafile.Aswith
anyofthelow-levelI/Ofunctions,beforewriting,openorcreateafilewith
fopen
,andobtainafileidentifier.Whenyoufinishprocessingafile,closeit
with
fclose
.
Bydefault,
fwrite
writesvaluesfromanarrayincolumnorderas8-bit
unsignedintegers(
uint8
).
Forexample,createafile
nine.bin
withtheintegersfrom1to9:
fid = fopen('nine.bin','w');
fwrite(fid, [1:9]);
fclose(fid);
Ifthevaluesinyourmatrixarenot8-bitunsignedintegers,specifythe
precisionofthevalues. Forexample,tocreateafilewithdouble-precision
values:
mydata = [pi, 42, , 1/3];
fid = fopen('double.bin','w');
fwrite(fid, mydata, 'double');
fclose(fid);
Foracompletelistofprecisiondescriptions,seethe
fwrite
functionreference
page.
OverwritingorAppendingtoanExistingFile
Bydefault,
fopen
opensfileswithreadaccess. Tochangethetypeoffile
access,usethe
permission
stringinthecallto
fopen
.Possible
permission
stringsinclude:
r
forreading
w
forwriting,discardinganyexistingcontentsofthefile
a
forappendingtotheendofanexistingfile
3-79
3
ExportingData
Toopenafileforbothreadingandwritingorappending,attachaplussign
tothepermission,suchas
'w+'
or
'a+'
. Foracompletelistofpermission
values,seethe
fopen
referencepage.
Note Ifyouopenafileforbothreadingandwriting,youmustcall
fseek
or
frewind
betweenreadandwriteoperations.
Whenyouopenafile,MATLABcreatesapointertoindicatethecurrent
positionwithinthefile.Toreadorwriteselectedportionsofdata,movethis
pointertoanylocationinthefile.Formoreinformation,see“Movingwithin
aFile”onpage2-121.
Example—OverwritingBinaryDatainanExistingFile
Createafile
magic4.bin
asfollows,specifyingpermissiontowriteandread:
fid = fopen('changing.bin','w+');
fwrite(fid,magic(4));
Theoriginal
magic(4)
matrixis:
16
2
3
13
5
11
10
8
9
7
6
12
4
14
15
1
Thefilecontains16bytes,1foreachvalueinthematrix.Replacethesecond
setoffourvalues(thevaluesinthesecondcolumnofthematrix)withthe
vector
[44 44 44 44]
:
% fseek k to the e fourth h byte after the beginning of the file
fseek(fid, 4, 'bof');
%write the four values
fwrite(fid,[44 44 44 4 44]);
% read d the results from the e file e into a 4-by-4 4 matrix
frewind(fid);
newdata = = fread(fid, , [4,4])
3-80
Exporting Binary Data withLow-LevelI/O
% close e the file
fclose(fid);
The
newdata
inthefile
changing.bin
is:
16
44
3
13
5
44
10
8
9
44
6
12
4
44
15
1
Example—AppendingBinaryDatatoanExistingFile
Addthevalues
[55 55 55 5 55]
totheendofthe
changing.bin
filecreatedin
thepreviousexample.
% open n the file to append and read
fid = fopen('changing.bin','a+');
% write e values s at end d of file
fwrite(fid,[55 55 55 5 55]);
% read d the results from the e file e into a 4-by-5 5 matrix
frewind(fid);
appended = fread(fid, [4,5])
% close e the file
fclose(fid);
The
appended
datainthefile
changing.bin
is:
16
44
3
13
55
5
44
10
8
55
9
44
6
12
55
4
44
15
1
55
CreatingaFileforUseonaDifferentSystem
Differentoperatingsystemsstoreinformationdifferentlyatthebyteorbit
level:
3-81
3
ExportingData
• Big-endiansystemsstorebytesstartingwiththelargestaddressinmemory
(thatis,theystartwiththebigend).
• Little-endiansystemsstorebytesstartingwiththesmallestaddress(the
littleend).
Windowssystemsuselittle-endianbyteordering,andUNIXsystemsuse
big-endianbyteordering.
Tocreateafileforuseonanopposite-endiansystem,specifythebyteordering
forthetargetsystem.Youcanspecifytheorderinginthecalltoopenthefile,
orinthecalltowritethefile.
Forexample,tocreateafilenamed
myfile.bin
onabig-endiansystemfor
useonalittle-endiansystem,useone(orboth)ofthefollowingcommands:
• Openthefilewith
fid = fopen('myfile.bin', 'w', 'l')
• Writethefilewith
fwrite(fidmydataprecision, 'l')
where
'l'
indicateslittle-endianordering.
Ifyouarenotsurewhichbyteorderingyoursystemuses,callthe
computer
function:
[cinfomaxsizeordering] = computer
Thereturned
ordering
is
'L'
forlittle-endiansystems,or
'B'
forbig-endian
systems.
OpeningFileswithDifferentCharacterEncodings
Encodingschemessupportthecharactersrequiredforparticularalphabets,
suchasthoseforJapaneseorEuropeanlanguages. Commonencoding
schemesincludeUS-ASCIIorUTF-8.
Theencodingschemedeterminesthenumberofbytesrequiredtoreador
write
char
values.Forexample,US-ASCIIcharactersalwaysuse1byte,but
3-82
Documents you may be interested
Documents you may be interested