Avatar of wilmsoft
wilmsoft asked on

Create a Bitmap w/600 DPI

I need to create a brand new bitmap, copy in some other images to create a larger image.
but, it makes it only 120 DPI. The orginal images were 600 DPI.

I have seen code to CHANGE a files DPI but, I don't have a file the bit map is in memory!?
Editors IDEs

Avatar of undefined
Last Comment
wilmsoft

8/22/2022 - Mon
MerijnB

Do you write the new (600 dpi) bitmap to disk? If yes, why don't you change the dpi afterwards (after you've written it to disk)
BdLm

as far a I know, the bit map only contains xpixel and xpixel and colordepth as a property, the DPI you have to negotiate with your printing device, means screen or printer
 
can you post a bit more to understand your problem?
 
sorry only in german >  http://entwickler-forum.de/showthread.php?t=25254
MerijnB

Bitmaps do actually contain information about DPI, but of course you're right, if you only display it on screen there is no real use for it.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
BdLm

if you know the size of your display in inches you can calculate the needed size for your bitmap ....
or see
http://msdn.microsoft.com/en-us/library/ms969894.aspx
 
BTW >  rescaling of bitmaps (increase) it is no real solution, as you do not add real information to your bitmap
MerijnB

A few questions, I'm not sure I understand the question fully.

- You want your bmp to be 600 dpi or 120 dpi?
- What are you using your in memory bitmap for?
ASKER
wilmsoft

The orginals are in 600 DPI.
I have 24 separate 600 DPI JPG images. I have to create ONE image from the separate images. I then send that image to a printer (it is capable of 2400 DPI).
So, this image is created in a JPGImage with is only in memory (IE never scaled down to the screen resolution) However, by default (I'm guessing) when you 'create' the JPGimage, it's DPI is only 120.
I have found many examples that will read in an Image from file, change the header information of the file and that will change the DPI. In my case there is never a file as I'm going from the 'canvas' of the memory JPGImage to the 'canvas' of the printer.
 
Speed is an issues so, I was trying to avoid writing a file, changing the file DPI, reading the file in to memory just to change the DPI.
 
 
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
MerijnB

ok, the big question now is do you have to change the dpi at all?
DPI is only how you interpret the pixels related to physical size (inches).

What goes wrong if you make the image in memory, don't think about the DPI at all, and sent it to the printer?

One more thing, you were talking about BMP before, but about JPG now, which one is it?
BdLm

convert bmp tp jpg -> i can provide code
stitch the image with your own delphi application  , need a image stitching algo ?
if not use the bitblt function from the WINDOWS API
single task >  use paint shop pro
 
don't take care on the DPI, pixel size and colort depth is the real image quality factor
 
MerijnB

pixel size?
Your help has saved me hundreds of hours of internet surfing.
fblack61
BdLm

@ MerijnB:  I work with virtual images at 500.000 * 500.000 pixel, image size on the HD ~ 30 Gbyte
shrink stretch,  ....   you can do, the real information is in the pixels, not in the dpi, this is my poor printer or screen
 
ASKER
wilmsoft

"One more thing, you were talking about BMP before, but about JPG now, which one is it?"
I said Bitmap... not BMP... Bitmap as in NOT vector information. As in a file that has information about dots that will make up an image. JPG, BMP, PNG, GIF all are Bitmaps. EPS, PS, PDF are all vector information (like lineto, moveto)
"don't take care on the DPI, pixel size"
Pixel size is a function of Dots per inch. If you have 3 DPI the thinnest line you could draw would be 1/3 of an inch. If I had a line that was drawn at 300 dpi, the smallest "PIXEL SIZE" could be 1/300 of an inch. but, not in the 3 DPI image, it would still be 1/3 of an inch. This is where you see all the little "jags" on a diagonal line.
 
"What goes wrong if you make the image in memory, don't think about the DPI at all, and sent it to the printer?"
 
I am doing that, and the image is again, 120 DPI by default. so, my nice 1/600 inch line is now 5 times fatter. and we are printing on a 1200 DPI printer where can see the "jaggies"
BdLm


nr. of pixels =  dot/inch_hardware  *  size_hardware_inches
 
post a bit more detaild on your problem--code
assume you loose resolution while reading the data source or use the wrong stitching/printing and again loose resolution
you can create the jags with ervery datasource, see sample ....

ee-dot-per-inch.jpg
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
wilmsoft

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question