Just for the heck of it, I tried this code in a demo of RB2007r1. In
RB2007r1 the DPI settings are now fixed, but the BMP still has an alpha
channel. I still wonder if there isn't a way around this...
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
RBNUBE
Sent: Tuesday, January 23, 2007 1:24 AM
To: RB-GettingStarted
Subject: BMP issues
I'm storing FolderItems (images) in the CellTags of a ListBox. A save
function dumps the images out as BMP files based on these FolderItems.
Two odd things are happening:
1) The dimensions and resolutions of the images are not the same as the
originals. I would like for them to be the same, if possible.
For example:
A image with the properties of 5" x 5" at 72 PPI will end up being 192" x
192" at 1.875 PPI.
2) The original files do not have an alpha channel. The generated BMP
files all have an alpha channel. I don't want or need an alpha channel and
this extra channel is adding a considerable about of size to the file (380K
without alpha, 570K with alpha).
Here is my code. Any suggestions?
Thanks!
Dim testForFolderItem as Variant
testForFolderItem = clbCatsNItems.CellTag(i, 3)
If testForFolderItem isA FolderItem and testForFolderItem <> nil then
itemPic = FolderItem(testForFolderItem).OpenAsPicture
itemPicFile = deptPicFolder.Child(picNamePartNumer)
If itemPic <> nil then
// Save pic.
If itemPic <> nil and itemPicFile <> nil then
itemPicFile.SaveAsPicture(itemPic)
clbCatsNItems.CellTag(i, 3) = itemPicFile
Else
MsgBox "Could not process image file."
End If
End If
End If
RB5.5.5 and a mostly unused copy of 2006r2.
WinXP, 2.2 GHz, 2G RAM
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|