Results 1 to 7 of 7

Thread: I want to rescale image...

  1. #1
    Junior Member Newbie
    Join Date
    May 2002
    Location
    changwon,kyungnam,republic of korea
    Posts
    3

    I want to rescale image...

    Hi ; I am high school student in Asia...

    (So I can't speak English well)

    I'm making small game for training.

    But I have big trouble now...

    I want to use 300 * 200 sized image to

    texture.

    Some people advised me to use 'gluScaleImage'

    But if I use this function,I always get

    strange image...

    Can I use gluScaleImage to rescale 300*200

    sized image to 256*256 sized image?

    I need your help ...
    Iamdjdora

  2. #2
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    764

    Re: I want to rescale image...

    I haven't tried your exact parameters, but it should be possible.

    Are you using the correcte format and type settings?

    format = GL_RGB (or GL_RGBA)
    typeIn = GL_UNSIGNED_BYTE
    typeOut = GL_UNSIGNED_BYTE

  3. #3
    Junior Member Newbie
    Join Date
    May 2002
    Location
    changwon,kyungnam,republic of korea
    Posts
    3

    Re: I want to rescale image...

    Maybe...

    I use correct parameters... ...
    Iamdjdora

  4. #4
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    764

    Re: I want to rescale image...

    Have you tried using gluBuild2DMipmaps?

    It does the scaling automatically for you (the texture does not have to have a size that is a power of two).

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: I want to rescale image...

    So what do you mean by 'strange' image?

  6. #6
    V-man
    Guest

    Re: I want to rescale image...

    Originally posted by marcus256:
    I haven't tried your exact parameters, but it should be possible.

    Are you using the correcte format and type settings?

    format = GL_RGB (or GL_RGBA)
    typeIn = GL_UNSIGNED_BYTE
    typeOut = GL_UNSIGNED_BYTE

    Also
    glPixelStorei(GL_UNPACK_ALIGNMENT, ?);
    glPixelStorei(GL_PACK_ALIGNMENT, ?);

    V-man

  7. #7
    Junior Member Newbie
    Join Date
    May 2002
    Location
    changwon,kyungnam,republic of korea
    Posts
    3

    Re: I want to rescale image...

    Hmm...;

    I got 'broken' image...;
    Iamdjdora

Similar Threads

  1. Replies: 1
    Last Post: 07-09-2017, 07:07 AM
  2. read gray image and color index image.
    By yjh1982 in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 08-21-2010, 04:09 AM
  3. Replies: 1
    Last Post: 01-31-2005, 11:01 AM
  4. problem in drawing a texture image(monochrome image)
    By philm in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-07-2003, 10:45 AM
  5. automatically rescale objects
    By Nico in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 07-11-2000, 05:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean