{oapdf_gg}
Office software is closely linked to the PDF,the PDF is also must have to control!      Set home Page  Add to Favorites  
You are here:Home > PDF Application > PDF Development
PDF Development
Using C# language the whole PDF document Strategy Guide Graphic
Finishing by: Date:2009-04-17 20:59:48 Popularity: Tags:

zoom and rotate images

u zoom

There are several ways to zoom picture:

public void scaleAbsolute (int newWidth, int newHeight)

public void scalePercent (int percent)

public void scalePercent (int percentX, int percentY)

public void scaleToFit (int fitWidth, int fitHeight)

child's picture size is 194 กม 202 pixels, if you want the picture smaller, you can scaleAbsolute (97, 101) for scaling, the use of scalePercent (50) also reached the same result.

can also scaleAbsolute (194, 101) to decrease, so these examples are on the sample code in 0607.

u on the impact of resolution

If a picture without any zoom, the resolution (resolution) is 72, if the picture zoom ratio of 50 percent, then a resolution of 144, if there are less than the zoom, the resolution will be even greater, However, because the same pixel size becomes even smaller. 72/300 = 24% using the ratio of put a 300dpi image, for example:you use a 300dpi scan 5 กม 5-inch picture, pictures, results for the 1500 กม 1500 pixels (5 กม 300), when you use 24% ( 72/300 = 0.24), the ratio of the picture placed in the middle of PDF documents, PDF images for 5 กม 5 inch 1500X1500 pixels 300dpi, the picture will always be 1500X1500 pixel size regardless of how.

u rotating

the following methods can rotate pictures

public void setRotation (double r)

see sample code 0608.

the original picture data

So far, all the examples used are from the picture to local disk or a Web site, but also contains the image information may be used to get the picture of an array of examples:

public static Image getInstance (byte [] img)

the method with the same effect as the previous method, the return of a new Gif, Jpeg or Png categories of Image objects.

sample code in 0609, we add a Jpeg file from one to the byte array read in the picture, it is clear that the use of other methods getInstance better examples, but this is only an example, the method getInstance dynamic creation of those who simply did not exist when the picture is very useful.

the examples also demonstrate how to create and use an original picture.

public static Image getInstance (int width, int height, int components, int bpc, byte data [])

this case has created a 100 กม 100 pixel image, since each pixel with RGB description, so image size is 100 กม 100 กม 3 bytes.

there isArticle InformationsComment Information
Category column

Site Help | Site Map | Feedback |
OAPDF.COM Copyright 2009 V1.1