|
Adobe applications can display images that large, but nothing I've tried under win32 (including several OSS apps that could do it under *nix(64?)) was able to load the one image that big that I tried. I assume they're using some sort of divide and conquer approach instead of just trying to use the API native constructs.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
Lao Wang wrote: i want to display an image which is over 400M size by the following ways:
"display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor. Parse is another issue.
One method is through a form of Level of Detail mapping for imagery, you can zoom into any portion of a very large image, yet not have anything more than 512x512 on any given cell. You break the cells into quads and those quads into quads, and those quads into quads, etc. until you reach full resolution. Then the hard-part is paging those in and out. Real memory becomes a cache for tiles loaded off disk. Now you can pull any given section rapidly. The primary advantage of tiling is that it allows you to combine multiple things all tiled off the same zone. This is extremely common for imagery related to terrain as terrain elevation can be tiled as well as imagery, perhaps as well as soil, or vegetation, or other layers of information. Each layer of information may have a different size, but be tiled the same. Elevation could be 64x64 while satellite imagery 512x512, while soil types are 32x32 and vegetation 64x64. Tiling is common for two sources together, and more common the more layers you have to use together. It is very difficult and often expensive (performance wise) not to tile multiple layers.
Another method is through windowed compression. This is probably the easiest, though depending on the data source not always as good looking. ECW free version limits your images to 500M which is within your limits. A GNU license or commercial license will buy you unlimited sizes (limited by your hardware of course). ECW and Jpeg2000 are wavelet compression which is very easy to window. You can then store the entire image on disk as compressed wavelet information, and extract the "window" of the visible portions of the image.
ECW and Jpeg 2000[^]
Tiling textures[^]
Image Clipmapping[^]
ChunkLOD Implimentation (images and elevation data)[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
El Corazon wrote: "display" is relative to your display, which theoretically is probably maxing out at 2560x1600 assuming a very nice monitor.
He could be working with super premium type monitors used for medical imaging, etc. I know those can reach at least 8 megapixels.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
dan neely wrote: used for medical imaging, etc. I know those can reach at least 8 megapixels.
If I recall those max out at 3500x3500 monichrome or about 10+ megapixels. Okay, even assuming that monitor, the task is still the same. I regularly show full scale NASA blue marble next gen earth images, http://earthobservatory.nasa.gov/Newsroom/BlueMarble/BlueMarble_monthlies.html[^] at 86400x43200 for the 500m per pixel version. No matter what monitor you have, you can't show that image. We do have one live-camera that takes 4096x3072 images, we display it on a group of monitors. Even with that, you might have to partition the image live on each monitor so that you can see it on multiple computers. Once you have the partitioning technique down, you can do live displays of any resolution on any monitor, or group of monitors.
There are similar techniques for volumetric medical imaging, though no mention of that has been made here. The concept is still the same. Massive data is needed to view in zoom mode at full resolution, nothing held back. But zoomed out you can get away with a bit less data (no pun intended).
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
GDI+ is probably too naive to handle the image size on its own, or much too slow. There is no reason why it couldn't deal with it, in theory.
OpenGL is limited by your texture memory. No textures bigger than the texture memory can be loaded. You will want to load the file into memory (regular) and split it up, swapping out sections as needed.
Setting up a texture in OpenGL moves data from RAM to VRAM and freeing the texture id will release it from VRAM so that you have space to load another etc... 4GB of RAM (page file) should be plenty enough for a 400M image.
This kind of resolution is enormous, if you are going to put it all on screen at once I would recommend downsizing it first, i.e. pre-build files which are downsized, otherwise you will have the same memory problems, not to mention the ugly aliasing effects.
Hope this helps.
|
|
|
|
|
Everything I try just ends up failing. I have a 3d file with bones and a mesh with key frames in a .X(directX mesh file). I can render a sigle mesh. However when it is animated I can't.
I looked in the sample code provided with DirectX smaple (Simple animation) which isnt simple at all. I understand coding well and how 3d graphics work and alot of directX. I just cant for some reason get an animation to render.
Advice, links, downloads, any thing that will point me in the right diretion will be helpful.
I feel like I been around the web and back a few times trying to find this.
|
|
|
|
|
hii.. is there any application by which we can divide the computer screen into two or more parts so that we can see more the two application simultaneously running on the screen. Please do reply if any body has any idea or any linl regarding this.. Thanx
prashant
prashant
|
|
|
|
|
Hi,
Prashant, what tools you are using? If using OpenGL with C++/VC++ it can be done, by creating two windows, you will have to manually adjust their size, and preferably you will like to disable the Maximize option for them.
Regards,
Adeel
|
|
|
|
|
according the GPS position information, i want to splice two images. but the two images have diffrent color palette, i can not simply replace or add one image's pixels with another image's pixels.
anyone can give me some suggestion?
thanks
|
|
|
|
|
Quick and dirty : you could do an pixel average between the 2 images.
|
|
|
|
|
using VC++, how to cut a rectangle segment picture from an bmp format image?
and the cutting rectangle can has diffrent angle. my mean is that the cutted image is certainly rectangle, and the cutting segment is also rectangle, but the tow rectangles are not parallel, there is a rotated angle between them.
thanks
|
|
|
|
|
Wouldn't this be more suited to the C++ forum since you're asking a C++ specific question.
|
|
|
|
|
There are two things I think you could be wanting to do here. I assume you don't want to draw a rotated black rectangle over the image, but want to get a rotated bit of the image
This is quite drawn out to explain if you don't have much experience with graphics already...
What you want to do is take the rectangle you want to cut and work out coordinates for the pixels, translate and rotate them (rotation matrix - google) and interpolate (bilinear interpolation - google it) between the neighbouring pixels in the original image to find the new pixel values.
I would give a full explanation, but if you are a graphics programmer you should already be familiar with these ideas.
Hope this helps.
|
|
|
|
|
thank you Jheriko++:
maybe i didn't describe my question clearly. assume i have a big image which is rectange, i want to cut a segment image from the big image, the segment image is also rectance, but the borders of the segment rectange are not parallel with the big image borders.
but from your explain, i think you first cut a rectange image from the big image, and then rotaed it.
wish you understand my opinion.
|
|
|
|
|
Hi all, I'm facing problem with the C++ code which i've included below!! I need to output the RGB values of each pixel(preferably in array form), but I'm not sure how to use the getPixel here to output values of each point in terms of R, G and B separately. Is there any other better functions to use or do ya have any idea how i could manipulate this function to my program??
The block i tried below on GetRValue(&image), GetGValue(&image) and GetBValue gives me a hexadecimal value for the first 2 but i cannot seem to compile when i tried to do the same -->GetBValue(&image).
Thank You~~
Regards,
Stressed One
#include <windows.h>
#include <iostream.h>
#include <cimg.h>
#include <stdio.h>
using namespace cimg_library;
HANDLE hfile;
DWORD written;
BITMAPFILEHEADER bfh;
BITMAPINFOHEADER bih;
RGBTRIPLE *image;
int main() {
int size, x,y, crColor;
float R,G,B;
double hf;
// Open the file
hfile = CreateFile("bear.bmp",GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,NULL,NULL);
// Read the header
ReadFile(hfile,&bfh,sizeof(bfh),&written,NULL);
ReadFile(hfile,&bih,sizeof(bih),&written,NULL);
// Read image
size = bih.biWidth*bih.biHeight; //allocate memory for the image
ReadFile(hfile,NULL,size*sizeof(RGBTRIPLE),&written,NULL); // Reads it off the disk
cout<<"The image width is "<<bih.biwidth<<"\n"; output="" the="" width="" of="" bitmap
="" cout<<"the="" image="" height="" is="" "<<bih.biheight<<"\n";=""
="" load="" image
="" cimg<unsigned="" char=""> image("bear.bmp");
CImgDisplay main_disp(image);
while (!main_disp.is_closed) {
main_disp.wait();
int getPixel(int x, int y);
R = GetRValue(image);
G = GetGValue(image);
B = GetBValue(image);
printf("%02X %02X %02X\r", GetRValue(image), GetGValue(image), GetBValue(image));
}
return 0;
}
|
|
|
|
|
Check the prototype of GetRValue, GetGValue and GetBValue, they return a BYTE from a DWORD rgb color.
other than that, I have not looked further at your code.
|
|
|
|
|
There's a bunch of problems with this code.
The code that reads the BMP makes alot of assumptions about the
BMP file format so it's going to fail in many instances.
Then the file is reloaded as a CImg object. Why?
There's no code anywhere that actually gets a pixel value from the bitmap.
...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
OK, lets get the laughing out our systems now. I can't load a cube (I'm new to XNA, but know a little C#). I'm following an article on CodeProject but it won't load the model ( iahve it a different name, but I made it so it SHOULD work) But, C# keeps saying it can't find the model in the folders.
protected override void LoadGraphicsContent(bool loadAllContent)<br />
{<br />
if (loadAllContent)<br />
{<br />
Player_Model = content.Load<Model>("Content\\Models\\Cube");<br />
}<br />
}<br /> I clearly stated them in the solution explorer... Help? Thanks in advance.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Didn't you forget the file extension ?
|
|
|
|
|
I'm Showing Videos on a WinForm and the Bounds of the Video are
videoWidth = form.Width
videoHeight = form.Width * videoHeight / videoWidth
videoX = 0
videoY = (form.Height - videoHeight) / 2
So the Video will Always be placed in the Center of the Form and Stretched to the Width of the Form and Height/YLoc Adjusted Accordingly. The Form's Backcolor is Black.
Depending upon the Video's Width to Height Ratio the Video's YLoc will be >=0. Now I can Need to Show the Messages onto the Form at the same Location (say 20, 20) Irrespective of the Video's YLoc. To show Messages I can
1) ONLY Paint Text on the Form at Fixed Loc. Problem - If the Video's YLoc = 0, then my Text would not be shown
2) ONLY Write Text Directly onto the Video. Text's Location will always depend on the Video's YLoc.
So what I see is that I need to use a combination of the above two methods.
So What can you suggest?
Thanks...
|
|
|
|
|
good evening,
i am not familiar with graphics field,but i tried to attach .swf image
to my website in the entry page but i couldnt,also i want to ask how can i download swf files and if there is any software important to access the file
thanks in advance
dina
|
|
|
|
|
hi dina
to Upload u r .swf file to u r web site pls put the code
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.h.cab#3,0,0,0" height="200" width="740" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="SRC" value="<b>flash folder name/File name</b>.swf" />
<embed src="<b>flash folder name / file name</b>.swf" pluginspage="http://www.macromedia.com/shockwave/download/" type="application/x-shockwave-flash" width="740" height="200" />
|
put this code where ever u need for flash.swf animations
Vgopi Krishna
|
|
|
|
|
hi... i have programmed VC++ with OpenGL application..the application was with three window, each one with owen lighting effects,motion, and objects i.e every window with its related myint() , firstly the programm was working succesfully but after some days i wanted to execute my program again the result was : the windows related to the lighting effects displayed nothing..nothing was in the windows(pitch black)..no object..no light..no motion!!!!..i would like to ask about the reason that makes two of three windows faild to dispaly objects and lighting effects althought the application was succesfuly programmed and no errors or wrongs were appeared. what can i do?
regards
Maria
|
|
|
|
|
It may be stupid but check that the camera is positioned correctly and that some objects are effectively in the view frustrum.
|
|
|
|
|
Hi, i'm trying to draw EMF or WMF files in an antialiased way.
I tried GDI+, AA drawing is ok when using DrawLine or other primitives but the DrawImage doesnt produce
AA output when beeing passed a Metafile object containing a WMF or EMF
So is there a way to draw EMF/WMF files with antialias ? (with or without gdi+)
Maybe something exists in order to convert EMF/WMF to EMF+ ? (it seems gdi+ can only AA on EMF+ files)
thanks for your help
|
|
|
|
|