Professional Web Applications Themes

converting Raw integer color values to RGB? - Macromedia Director Lingo

Does anyone know how to convert raw integer color values (what you get when using getpixel on a 32bit image) into RGB values? Thanx. Paul Weaver Designer/Animator [email]paulwvideoideas.com[/email]...

  1. #1

    Default converting Raw integer color values to RGB?

    Does anyone know how to convert raw integer color values (what you get when
    using getpixel on a 32bit image) into RGB values? Thanx.

    Paul Weaver Designer/Animator [email]paulwvideoideas.com[/email]


    paul Guest

  2. #2

    Default Re: converting Raw integer color values to RGB?

    try

    yourObj.colorType = #rgb
    JB Guest

  3. #3

    Default Re: converting Raw integer color values to RGB?

    That doesn't seem to work, but thanx for trying JB. Since the help has next
    to nothing to say about colorType and nearly nothing about "raw integer", I
    can only speculate as to why I keep getting a "property not found" error
    when attempting to change this property. My guess is that a raw integer is a
    different kind of object than an RGB or palette object. If it matters,
    here's the line that creates the color object, and it's working off a 32bit
    cast member:
    sampleColor=member(sprite(me.spritenum).member).ge tpixel(sampleLoc[1],sample
    Loc[2])

    this returns a crazy big number like -14272295. Any other ideas as to how
    this mysterious number is used to derive a color? Anyone?
    thanx again!
    -paul-

    "JB" <lingoguysbcglobal.net> wrote in message
    news:lingoguy-E81064.15585727082003forums.macromedia.com...
    > try
    >
    > yourObj.colorType = #rgb

    paul Guest

  4. #4

    Default Re: converting Raw integer color values to RGB?

    I'm such a goof... I've been using the getPixel command directly on a cast
    member, instead of from an imageOjbect of that cast member... that's why I
    get the raw integer. There's no need for conversion if you're using the
    command correctly from the start! Thanx again!

    "paul" <paulwvideoideas.com> wrote in message
    news:bil0sk$het$1forums.macromedia.com...
    > That doesn't seem to work, but thanx for trying JB. Since the help has
    next
    > to nothing to say about colorType and nearly nothing about "raw integer",
    I
    > can only speculate as to why I keep getting a "property not found" error
    > when attempting to change this property. My guess is that a raw integer is
    a
    > different kind of object than an RGB or palette object. If it matters,
    > here's the line that creates the color object, and it's working off a
    32bit
    > cast member:
    >
    sampleColor=member(sprite(me.spritenum).member).ge tpixel(sampleLoc[1],sample
    > Loc[2])
    >
    > this returns a crazy big number like -14272295. Any other ideas as to how
    > this mysterious number is used to derive a color? Anyone?
    > thanx again!
    > -paul-
    >
    > "JB" <lingoguysbcglobal.net> wrote in message
    > news:lingoguy-E81064.15585727082003forums.macromedia.com...
    > > try
    > >
    > > yourObj.colorType = #rgb
    >
    >

    paul Guest

Similar Threads

  1. Replies: 0
    Last Post: January 16th, 07:58 PM
  2. Replies: 0
    Last Post: October 27th, 11:19 AM
  3. Replies: 0
    Last Post: October 27th, 11:13 AM
  4. ASP integer date/time converting problems
    By Ralph Hodenius [MS] in forum ASP Database
    Replies: 0
    Last Post: January 8th, 02:01 PM
  5. Replies: 1
    Last Post: August 8th, 08:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139