encode_watermark method
encode_watermark(, input, text)
Encode a text into mesh’ blind watermark.
Returns
A new mesh instance with blind watermark encoded
@staticmethod
def encode_watermark(input, text):
...
Parameter | Type | Description |
---|---|---|
input | aspose.threed.entities.Mesh | Mesh to encode a blind watermark |
text | str | Text to encode to the mesh |
Remarks
Both Watermark.encode_watermark
and Watermark.decode_watermark
will perform license check
Trial usage will throw exception, you can use TrialException.suppress_trial_exception
to suppress the exception, but it will not lift the restriction here.
A valid license is required to use these features without any restrictions.
Example
The following code shows how to encode a blind watermark into a mesh and save to ply file
from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark
mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello")
Scene(encodedMesh).save("test.ply")
encode_watermark(, input, text, password)
Encode a text into mesh’ blind watermark.
Returns
A new mesh instance with blind watermark encoded
@staticmethod
def encode_watermark(input, text, password):
...
Parameter | Type | Description |
---|---|---|
input | aspose.threed.entities.Mesh | Mesh to encode a blind watermark |
text | str | Text to encode to the mesh |
password | str | Password to protect the watermark, it’s optional |
Remarks
Both Watermark.encode_watermark
and Watermark.decode_watermark
will perform license check
Trial usage will throw exception, you can use TrialException.suppress_trial_exception
to suppress the exception, but it will not lift the restriction here.
A valid license is required to use these features without any restrictions.
Example
The following code shows how to encode a blind watermark into a mesh and save to ply file
from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark
mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello", "password")
Scene(encodedMesh).save("test.ply")
encode_watermark(, input, text, password, permanent)
Encode a text into mesh’ blind watermark.
Returns
A new mesh instance with blind watermark encoded
@staticmethod
def encode_watermark(input, text, password, permanent):
...
Parameter | Type | Description |
---|---|---|
input | aspose.threed.entities.Mesh | Mesh to encode a blind watermark |
text | str | Text to encode to the mesh |
password | str | Password to protect the watermark, it’s optional |
permanent | bool | The permanent watermark will not be overwritten or removed. |
Remarks
Both Watermark.encode_watermark
and Watermark.decode_watermark
will perform license check
Trial usage will throw exception, you can use TrialException.suppress_trial_exception
to suppress the exception, but it will not lift the restriction here.
A valid license is required to use these features without any restrictions.
Example
The following code shows how to encode a blind watermark into a mesh and save to ply file
from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark
mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello", "password")
Scene(encodedMesh).save("test.ply")
See Also
- module
aspose.threed.utilities
- class
Mesh
- class
Watermark