Large Images cannot be displayed
Blitz3D Forums/Blitz3D Programming/Large Images cannot be displayed
| ||
I experienced the following problem: I wrote a geography quiz game which also uses large jpg- and bmp-Files for maps. It works well on my notebook, but the larger maps (above roughly 2 Megapixel) cannot be displayed on my much stronger tower PC. (The code is the same, the jpg-Files are the same, but the drawimage-command leads to a funny display or an error.) Does anyone have an idea what could be the cause? (Maybe some PC memory settings I have to change.) rgds, Mimi |
| ||
I have to add, that other programs (like MS Office Picture Manager) have no problems at all to display these large maps. It is only a Blitz+ problem. |
| ||
You should really have put this in the B+ forum. When you say 'Cannot be displayed', what happens? How big is the image? Can an image half the size be loaded OK? If the image is power2 does it load OK? Can you cut the image down into smaller tiles? |
| ||
Try putting the image into an image buffer and then copyrecting a screensized part of it onto the backbuffer. Andy |
| ||
You shouldn't really rely on images bigger than the current graphics mode working on all machines. If they are then I would chop them up. Its a DX(7) issue. Is this in fullscreen? Is it in Blitz+ ? If so, what is it doing in the Blitz3D forum? |
| ||
ive use b+ and have a prog that handles large images, not sure they are as big as what u say, but they are close. My canvas is created to be the size of the image, maybe thats an issue |
| ||
Did you find a solution? Andy |
| ||
Try using the DrawImageRect/DrawBlockRect commands (does B+ have these?) to display a rectangular portion of a larger image. |
| ||
Sorry for posting the topic in the wrong forum (I did it by mistake). But anyhow, thanx for your advice. No, I could not solve the problem. Even if I "copyrect" the adjusted portion of the image into the canvas, the image is not displayed properly or produces an error. It seems to be a memory problem on the machine in connection with Blitz+. As if Blitz could not allocate enough memory for the image. (As I mentioned: It works well with ordinary Image viewers. And it works well [even with Blitz+] on my notebook which has much less memory.) Mimi |
| ||
but the drawimage-command leads to a funny display or an error What is the error? How big is the image? Can an image half the size be loaded OK? If the image is power2 does it load OK? Can you cut the image down into smaller tiles? |
| ||
1)error and imagesize: images bigger than roughly 2 Megapixels: the picture looks mostly white, as if the pixels were spread far apart from each other. I cannot recognize some text, but don't know if it is part of the image, because completely distorted. images bigger than roughly 20 Megapixels: complete crash of B+ with this Office2003 "report error" window. 2) if by "power2" you mean the square image size, then it cannot be loaded OK. (My other PC is at home and I am currently in my office working on my notebook, where everythin works well. About cutting the image into smaller tiles, I have to check first at home.) thanx, Mimi |
| ||
>1)error and imagesize: >images bigger than roughly 2 Megapixels: the picture looks >mostly white, as if the pixels were spread far apart from >each other. I cannot recognize some text, but don't know >if it is part of the image, because completely distorted. >images bigger than roughly 20 Megapixels: complete crash >of B+ with this Office2003 "report error" window. You'll get a better reply if you provide a resolution(1024x748 etc.) and format(BMP, JPG etc.) and possibly colour depth(16bits, 32bits etc.). >2) if by "power2" you mean the square image size, then it >cannot be loaded OK. power2 means that the width and height are both a power of 2(2^10=1024 etc) Andy |
| ||
Mimi, since you are using BlitzPlus, try loading the images using the software renderer - in fact it might be a good idea to cut them in software mode too, then switch to directx/opengl mode after - of course that switch may clear all gfx from mem so you may have to save them out to temp files first... If, using the software renderer, you still have large image problems, you can be sure that it is a problem with BlitzPlus. If not, then it is a problem with DirectX/gfx card/drivers. I'd also try OpenGL mode and see if that handles it any better. |
| ||
Try using the DrawImageRect/DrawBlockRect commands (does B+ have these?) to display a rectangular portion of a larger image. Doesn't this solve the problem, then? It does for me using Blitz3D. |