Introduction to Styles and Quality Modifiers in TypeScript
Introduction to Styles and Quality Modifiers
Welcome back! In the previous lesson, you learned how to craft effective prompts by focusing on the key components: subject, context, and style. This lesson builds on that foundation by introducing you to styles and quality modifiers, which are essential for enhancing the quality and artistic expression of your generated images. By the end of this lesson, you will understand how to combine these elements to create visually stunning and high-quality images using Google's Gemini API and its native image generation.
Understanding Quality Modifiers
Quality modifiers are keywords that enhance the detail and clarity of the generated images. They help the model understand that you are aiming for a high-quality asset. For instance, general modifiers like "high-quality," "beautiful," and "stylized" can be used to improve the overall aesthetic of an image. When generating photos, you might use specific modifiers such as "4K", "HDR", or "Studio Photo" to achieve a more realistic and detailed output. Similarly, for art and illustration, modifiers like "by a professional" or "detailed" can add depth and intricacy to the artwork.
Aesthetic modifiers are not resolution settings. Phrases such as
4K,8K resolution, orHDRare descriptive prompt text: they nudge the model toward a crisp, detailed, professional look, but they do not set the pixel dimensions of the output file. Writing "8K resolution" in a prompt will not produce an 8K image. The actual output size is controlled by the API's image configuration (theimageConfigobject, e.g.aspectRatio), which is separate from the words in your prompt. Treat these keywords as style cues, not as a resolution knob.
To illustrate the impact of quality modifiers, consider the following example. A prompt without quality modifiers, such as "a photo of a corn stalk," might produce a basic image. However, by adding quality modifiers like "4K HDR beautiful photo of a corn stalk taken by a professional photographer," the resulting image will be more vibrant and detailed.
Exploring Artistic Styles
Artistic styles define the visual approach of the generated image. In this lesson, we will explore two main styles: photography and art/illustration. For photography, you can use prompts that start with "A photo of..." to generate photorealistic images. For example, "A photo of coffee beans in a kitchen on a wooden surface" will produce an image that resembles a real photograph.
In contrast, art and illustration styles allow for more creative expression. You can use prompts like "A painting of..." or "A sketch of..." to create images in various artistic styles. For instance, "A technical pencil drawing of an angular sporty electric sedan with skyscrapers in the background" will generate a detailed pencil sketch, while "A digital art of an angular sporty electric sedan with skyscrapers in the background" will produce a vibrant digital artwork.
