help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applying texture map of image to object using Octave 5.1 error


From: Rick T
Subject: Re: Applying texture map of image to object using Octave 5.1 error
Date: Wed, 6 Mar 2019 04:57:31 -0500

I believe it's used as a variable to the image.
original = imread('imported_image.jpg');

On Wed, Mar 6, 2019 at 4:08 AM Pantxo <address@hidden> wrote:
RT wrote
> Applying texture map of image to object using Octave 5.1 error
> The error I'm getting is "error: invalid value for array property "cdata"
> "
>
> --

Hi,

In Octave 5 the only supported image data types for textures are uint8 and
double. Any other data type will trigger this error. What does "class
(original)" return?

At least with the default image data your example works for me:

figure ();
im = get (0, "defaultimagecdata");
[X,Y,Z] = ellipsoid (0,0,0,10,10,10);
hs = surf (X, Y, Z, "FaceColor", "texturemap", "CData", im);

Pantxo




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]