<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/settingAlphaOne(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(im)imageBySettingAlphaOneInExtent:"
  },
  "title" : "settingAlphaOne(in:)"
}
-->

# settingAlphaOne(in:)

Returns a new image created by setting all alpha values to 1.0 within the specified rectangle and to 0.0 outside of that area.

```
func settingAlphaOne(in extent: CGRect) -> CIImage
```

## Parameters

`extent`

The rectangular area in the image to be set to full opacity.

## Return Value

An image object representing the result of the operation.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)