~ubuntu-branches/ubuntu/saucy/libjpeg-turbo/saucy-security

« back to all changes in this revision

Viewing changes to java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2013-07-28 16:52:51 UTC
  • mfrom: (1.1.3) (9.1.1 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130728165251-7vg6wszhm941kdej
Tags: 1.3.0-0ubuntu1
* New upstream release.
  - drop debian/patches/branch-updates.diff
  - refresh tjunittest.patch (now renamed to install-tjunittest.patch)
* Update debian/control:
  - add myself to Uploaders.
* Update debian/copyright:
  - add RSA Data Security copyright (md5).
* Update debian/libturbojpeg.install:
  - install libturbojpeg.so.0* (needed by tjunittest and tjbench).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!--NewPage-->
3
3
<HTML>
4
4
<HEAD>
5
 
<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 14:29:13 CDT 2012 -->
 
5
<!-- Generated by javadoc (build 1.6.0_43) on Fri Apr 26 20:05:34 CDT 2013 -->
6
6
<TITLE>
7
7
TJCompressor
8
8
</TITLE>
9
9
 
10
 
<META NAME="date" CONTENT="2012-06-29">
 
10
<META NAME="date" CONTENT="2013-04-26">
11
11
 
12
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
13
 
133
133
 source image stored in <code>srcImage</code> with the newly-created
134
134
 instance.</TD>
135
135
</TR>
 
136
<TR BGCOLOR="white" CLASS="TableRowColor">
 
137
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)">TJCompressor</A></B>(byte[]&nbsp;srcImage,
 
138
             int&nbsp;x,
 
139
             int&nbsp;y,
 
140
             int&nbsp;width,
 
141
             int&nbsp;pitch,
 
142
             int&nbsp;height,
 
143
             int&nbsp;pixelFormat)</CODE>
 
144
 
 
145
<BR>
 
146
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a TurboJPEG compressor instance and associate the uncompressed
 
147
 source image stored in <code>srcImage</code> with the newly-created
 
148
 instance.</TD>
 
149
</TR>
136
150
</TABLE>
137
151
&nbsp;
138
152
<!-- ========== METHOD SUMMARY =========== -->
266
280
               int&nbsp;pixelFormat)</CODE>
267
281
 
268
282
<BR>
 
283
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use
 
284
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> instead.</I></TD>
 
285
</TR>
 
286
<TR BGCOLOR="white" CLASS="TableRowColor">
 
287
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
288
<CODE>&nbsp;void</CODE></FONT></TD>
 
289
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)">setSourceImage</A></B>(byte[]&nbsp;srcImage,
 
290
               int&nbsp;x,
 
291
               int&nbsp;y,
 
292
               int&nbsp;width,
 
293
               int&nbsp;pitch,
 
294
               int&nbsp;height,
 
295
               int&nbsp;pixelFormat)</CODE>
 
296
 
 
297
<BR>
269
298
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Associate an uncompressed source image with this compressor instance.</TD>
270
299
</TR>
271
300
<TR BGCOLOR="white" CLASS="TableRowColor">
330
359
 instance.
331
360
<P>
332
361
<DL>
333
 
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>width</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>pitch</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>height</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int)</CODE></A> for description
 
362
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>width</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pitch</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>height</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of
 
363
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)
 
364
<DT><B>Throws:</B>
 
365
<DD><CODE>java.lang.Exception</CODE></DL>
 
366
</DL>
 
367
<HR>
 
368
 
 
369
<A NAME="TJCompressor(byte[], int, int, int, int, int, int)"><!-- --></A><H3>
 
370
TJCompressor</H3>
 
371
<PRE>
 
372
public <B>TJCompressor</B>(byte[]&nbsp;srcImage,
 
373
                    int&nbsp;x,
 
374
                    int&nbsp;y,
 
375
                    int&nbsp;width,
 
376
                    int&nbsp;pitch,
 
377
                    int&nbsp;height,
 
378
                    int&nbsp;pixelFormat)
 
379
             throws java.lang.Exception</PRE>
 
380
<DL>
 
381
<DD>Create a TurboJPEG compressor instance and associate the uncompressed
 
382
 source image stored in <code>srcImage</code> with the newly-created
 
383
 instance.
 
384
<P>
 
385
<DL>
 
386
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>x</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>y</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>width</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pitch</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>height</CODE> - see <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> for description<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of
 
387
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)
334
388
<DT><B>Throws:</B>
335
389
<DD><CODE>java.lang.Exception</CODE></DL>
336
390
</DL>
345
399
</TR>
346
400
</TABLE>
347
401
 
348
 
<A NAME="setSourceImage(byte[], int, int, int, int)"><!-- --></A><H3>
 
402
<A NAME="setSourceImage(byte[], int, int, int, int, int, int)"><!-- --></A><H3>
349
403
setSourceImage</H3>
350
404
<PRE>
351
405
public void <B>setSourceImage</B>(byte[]&nbsp;srcImage,
 
406
                           int&nbsp;x,
 
407
                           int&nbsp;y,
352
408
                           int&nbsp;width,
353
409
                           int&nbsp;pitch,
354
410
                           int&nbsp;height,
359
415
<P>
360
416
<DD><DL>
361
417
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - image buffer containing RGB or grayscale pixels to be
362
 
 compressed<DD><CODE>width</CODE> - width (in pixels) of the source image<DD><CODE>pitch</CODE> - bytes per line of the source image.  Normally, this should be
 
418
 compressed<DD><CODE>x</CODE> - x offset (in pixels) of the region from which the JPEG image
 
419
 should be compressed, relative to the start of <code>srcImage</code>.<DD><CODE>y</CODE> - y offset (in pixels) of the region from which the JPEG image
 
420
 should be compressed, relative to the start of <code>srcImage</code>.<DD><CODE>width</CODE> - width (in pixels) of the region in the source image from
 
421
 which the JPEG image should be compressed.<DD><CODE>pitch</CODE> - bytes per line of the source image.  Normally, this should be
363
422
 <code>width * TJ.pixelSize(pixelFormat)</code> if the source image is
364
423
 unpadded, but you can use this parameter to, for instance, specify that
365
 
 the scanlines in the source image are padded to 4-byte boundaries, as is
366
 
 the case for Windows bitmaps.  You can also be clever and use this
367
 
 parameter to skip lines, etc.  Setting this parameter to 0 is the
368
 
 equivalent of setting it to <code>width *
369
 
 TJ.pixelSize(pixelFormat)</code>.<DD><CODE>height</CODE> - height (in pixels) of the source image<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of
 
424
 the scanlines in the source image are padded to a 4-byte boundary or to
 
425
 compress a JPEG image from a region of a larger source image.  You can
 
426
 also be clever and use this parameter to skip lines, etc.  Setting this
 
427
 parameter to 0 is the equivalent of setting it to <code>width *
 
428
 TJ.pixelSize(pixelFormat)</code>.<DD><CODE>height</CODE> - height (in pixels) of the region in the source image from
 
429
 which the JPEG image should be compressed.<DD><CODE>pixelFormat</CODE> - pixel format of the source image (one of
370
430
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.PF_*</CODE></A>)
371
431
<DT><B>Throws:</B>
372
432
<DD><CODE>java.lang.Exception</CODE></DL>
374
434
</DL>
375
435
<HR>
376
436
 
 
437
<A NAME="setSourceImage(byte[], int, int, int, int)"><!-- --></A><H3>
 
438
setSourceImage</H3>
 
439
<PRE>
 
440
public void <B>setSourceImage</B>(byte[]&nbsp;srcImage,
 
441
                           int&nbsp;width,
 
442
                           int&nbsp;pitch,
 
443
                           int&nbsp;height,
 
444
                           int&nbsp;pixelFormat)
 
445
                    throws java.lang.Exception</PRE>
 
446
<DL>
 
447
<DD><B>Deprecated.</B>&nbsp;<I>Use
 
448
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> instead.</I>
 
449
<P>
 
450
<DD><DL>
 
451
 
 
452
<DT><B>Throws:</B>
 
453
<DD><CODE>java.lang.Exception</CODE></DL>
 
454
</DD>
 
455
</DL>
 
456
<HR>
 
457
 
377
458
<A NAME="setSubsamp(int)"><!-- --></A><H3>
378
459
setSubsamp</H3>
379
460
<PRE>
422
503
<DD><DL>
423
504
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the JPEG image.  Use
424
505
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for this buffer based on
425
 
 the image width and height.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
 
506
 the image width, height, and level of chrominance subsampling.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
426
507
<DT><B>Throws:</B>
427
508
<DD><CODE>java.lang.Exception</CODE></DL>
428
509
</DD>
463
544
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or
464
545
 grayscale pixels to be compressed<DD><CODE>dstBuf</CODE> - buffer that will receive the JPEG image.  Use
465
546
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for this buffer based on
466
 
 the image width and height.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
 
547
 the image width, height, and level of chrominance subsampling.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
467
548
<DT><B>Throws:</B>
468
549
<DD><CODE>java.lang.Exception</CODE></DL>
469
550
</DD>
504
585
 TurboJPEG's underlying codec to produce a planar YUV image that is
505
586
 suitable for direct video display.  Specifically, if the chrominance
506
587
 components are subsampled along the horizontal dimension, then the width
507
 
 of the luminance plane is padded to 2 in the output image (same goes for
508
 
 the height of the luminance plane, if the chrominance components are
509
 
 subsampled along the vertical dimension.)  Also, each line of each plane
510
 
 in the output image is padded to 4 bytes.  Although this will work with
511
 
 any subsampling option, it is really only useful in combination with
512
 
 <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420"><CODE>TJ.SAMP_420</CODE></A>, which produces an image compatible with the I420 (AKA
513
 
 "YUV420P") format.
 
588
 of the luminance plane is padded to the nearest multiple of 2 in the
 
589
 output image (same goes for the height of the luminance plane, if the
 
590
 chrominance components are subsampled along the vertical dimension.)
 
591
 Also, each line of each plane in the output image is padded to 4 bytes.
 
592
 Although this will work with any subsampling option, it is really only
 
593
 useful in combination with <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_420"><CODE>TJ.SAMP_420</CODE></A>, which produces an image
 
594
 compatible with the I420 (AKA "YUV420P") format.
514
595
<P>
515
596
<DD><DL>
516
597
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer that will receive the YUV planar image.  Use