Jump to content
  • Advertisement
Sign in to follow this  
szaszabi

image size

This topic is 4854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, I would like to load a bigger image size into my program. The image size is around W:6570 H:1178. How can I load it? I downloaded all lessons, but I could not find the process to load a bigger image size than 256*256 and 512*512. Do you have any comment please help me. Szabi

Share this post


Link to post
Share on other sites
Advertisement
Hi!

There is no difference in loading of image with different resoultions. You load it the same way you load 256x256 or 512x512.

But in case of using it with the textures (I assume you want to make a OpenGL texture out of it) you must ensure the following:

- make sure your hardware supports such a texture resolution
- make sure your texture is power of 2 (while building mipmapps it is not required I guess, pls correct me if I am wrong, as well as in rectangle textures but again your hardware must support it)

hope it helps :-)

Share this post


Link to post
Share on other sites

Hi,

Thanks for your help, but it is important me to not edit the size of the image. I have a fixed image size (W:6570 H:1178) and the size of it is not power of 2. I would like to display it without distortion.
I can not belive that there is not a function or procedure to solve this problem. I could not find it till now:((.

if somebody has any idea, please help me.

Share this post


Link to post
Share on other sites
Quote:
I can not belive that there is not a function or procedure to solve this problem. I could not find it till now:((.

There is, it's called The Gimp/Photoshop.

Quote:
it is important me to not edit the size of the image. I have a fixed image size (W:6570 H:1178) and the size of it is not power of 2. I would like to display it without distortion.

So cut it up in several extremely large tiles then and puzzle it together at runtime.

I am curious though, why is it so important not to change the size? You have encrypted data or sensitive watermarking on it?

Share this post


Link to post
Share on other sites
Quote:
Original post by enmaniac
- make sure your texture is power of 2 (while building mipmapps it is not required I guess, pls correct me if I am wrong, as well as in rectangle textures but again your hardware must support it)


if you have a Geforce 6600 or above you don't need to bother with this fact since it supports the NPOT extesion.

allso it's not possible to just stuff it into a huge 8kx2k texture since
1. it uses a lot of texture memory (33554432 bytes to be exact or a whopping 32MB)
2. most cards does not support textures larger than 4kx4k

so to keep the all the pixels intact you will have to cut it up in little pices.
But the best thing would still be to resize it so it fits in 3 2kx1k images.

Share this post


Link to post
Share on other sites
Hi,

Quote:

I am curious though, why is it so important not to change the size? You have encrypted data or sensitive watermarking on it?


I have just a panorama picture from a ruin and I have to scroll from edge to edge.
I think, I will do it in other program language for example: Java, delphi.

Thanks for your help!

Share this post


Link to post
Share on other sites
Just to clear one thing up - I understand why you said that but C/C++ is just as good as either of those two languages ;)
The issue is with OpenGL and DirectX (well actually it's to do with how graphics cards deal with textures) rather than the language you choose.

Given that you won't be able to see the entire image onscreen at the same time (assuming you want to view it at full size), breaking it up into smaller textures still makes sense if you want to use OpenGL to display it.

Also rather than cutting the picture up in an image editor, why not write your program to load the fullsize image & break it up into power-of-two chunks itself?

Share this post


Link to post
Share on other sites
Or stick with C/C++ and use SDL. Load that image as a software surface so that video memory isn't a problem. SDL will keep the surface at the original size.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Non of these posts yet confirm that szaszabi wants to use the original image as a texture. If szaszabi just wants to display an image, nothing more, loading the data and displaying it shouldn't be a problem.
Of course, as stated, using the image as texture would create some issues. But as I mentioned, we really don't know if that's the case here.

Share this post


Link to post
Share on other sites
Granted, except for that it's been posted in the NeHe forum, so the reasonable assumption to make is that OpenGL is involved.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!