# SafeLlavaImageEmbedHandle Namespace: LLama.Native A Reference to a llava Image Embed handle ```csharp public sealed class SafeLlavaImageEmbedHandle : SafeLLamaHandleBase, System.IDisposable ``` Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeLLamaHandleBase](./llama.native.safellamahandlebase.md) → [SafeLlavaImageEmbedHandle](./llama.native.safellavaimageembedhandle.md)
Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Properties ### **IsInvalid** ```csharp public bool IsInvalid { get; } ``` #### Property Value [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
### **IsClosed** ```csharp public bool IsClosed { get; } ``` #### Property Value [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
## Methods ### **CreateFromFileName(SafeLlavaModelHandle, LLamaContext, String)** Create an image embed from an image file ```csharp public static SafeLlavaImageEmbedHandle CreateFromFileName(SafeLlavaModelHandle ctxLlava, LLamaContext ctxLlama, string image) ``` #### Parameters `ctxLlava` [SafeLlavaModelHandle](./llama.native.safellavamodelhandle.md)
`ctxLlama` [LLamaContext](./llama.llamacontext.md)
`image` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
Path to the image file. Supported formats: JPGPNGBMPTGA #### Returns [SafeLlavaImageEmbedHandle](./llama.native.safellavaimageembedhandle.md)
#### Exceptions [InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception)
### **CreateFromMemory(SafeLlavaModelHandle, LLamaContext, Byte[])** Create an image embed from the bytes of an image. ```csharp public static SafeLlavaImageEmbedHandle CreateFromMemory(SafeLlavaModelHandle ctxLlava, LLamaContext ctxLlama, Byte[] image) ``` #### Parameters `ctxLlava` [SafeLlavaModelHandle](./llama.native.safellavamodelhandle.md)
`ctxLlama` [LLamaContext](./llama.llamacontext.md)
`image` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
Image bytes. Supported formats: JPGPNGBMPTGA #### Returns [SafeLlavaImageEmbedHandle](./llama.native.safellavaimageembedhandle.md)
### **ReleaseHandle()** ```csharp protected bool ReleaseHandle() ``` #### Returns [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)