AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Ui fluid image12/24/2023 First let’s take a look at the fundamental method WOOF_Image::tag: Example 4: HTML tag generation theme_image("logo.jpg") If you want more control over this output, there are a number of methods you can use to generate HTML tags. The WOOF_Image class implements the PHP5 magic method _toString to automatically generate an appropriate HTML tag when we echo the object directly. To extract EXIF information from your images, you can call on the WOOF_Image::exif image, which returns a WOOF_EXIF object: Example 3: EXIF data the->photos->image Images can contain embedded information describing the photographic properties, and this information is stored using the EXIF standard. Then the example will yield the following results (see code comments): Example 2: Orientation info theme_image("headers/chessboard-thumbnail.jpg") Suppose we load in the chessboard thumbnail from the Twenty Eleven theme, which is a landscape image: Figure 1: The Chessboard header thumbnail from Twenty Eleven Url ?>" width="width ?>" height="height ?>" />īased on the width and height, WOOF_Image can determine info about the orientation of your image too, which it offers via the methods WOOF_Image::orientation, WOOF_Image::is_landscape, WOOF_Image::is_portrait, and WOOF_Image::is_square. First let’s look at the basics: WOOF_Image::width, and WOOF_Image::height: Example 1: Getting the width and height to manually generate a tag theme_image("logo.png") ?> There are a number of methods to access information about the dimensions of your image. The WOOF_Image class contains methods to access dimension info about your images, and EXIF data (if applicable). The examples presented in this section assume you already know how to access images via the API, please read through Accessing Files and Images if you’re not familiar. This class offers a number of methods to access information about your images, and also a wide selection of resizing, cropping, filtering, and processing methods. All images you interact with in the MasterPress API are represented by the WOOF_Image class.
0 Comments
Read More
Leave a Reply. |