|
Hi,
I looking for a possibility to access (read and write) the information tags (like tilte, author, subject and so on) of a JPG file.
Thanks, Thorsten
|
|
|
|
|
Check Davide Pizzolato's Cexif[^] library.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hey this link is really cool.
But I need to know how to write data to a JPG.
Further I have to access (read/write) the file information shown under file properties in Windows, e.g. Title, Subject, Author and so on.
Thorsten
|
|
|
|
|
Pull from the thread Davide's library is a wrapper for a library called exif which possibly has the ability to write to a JPEG as well as reading. It might contain info on the particular tags you're interested. Good luck.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thowa wrote:
Further I have to access (read/write) the file information shown under file properties in Windows, e.g. Title, Subject, Author and so on.
You'll want to use StgOpenStorageEx() to access that information.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Where are you seeing such information (i.e., I've not know graphic files to contain such information)? While the JPEG didn't define a format per se, a de-facto standard is JFIF (JPEG File Information Format). Unfortunately, I'm unable to find a good read on it. The few available from www.wotsit.org were of no help.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The link given by Joaquín M López Muñoz contains again another link[^].
There you might find more information...
|
|
|
|
|
Sorry, I might have misunderstood you.
Windows XP offers a tab in teh file properties, where the user can view/edit these fileds.
(Unfortunately I cannot post a screenshot here, can I?)
Thorsten
|
|
|
|
|
thowa wrote:
Windows XP offers a tab in teh file properties, where the user can view/edit these fileds.
As does Windows 2000. It's the Summary tab of the Properties dialog.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi:
I don't know if this is still the same - but I think I ran into this problem a while ago. The JPEG standard itself is only for compression using DCT methods - it has nothing to do with storing of information about the image. I had this problem when trying to extract the height and width of the image - there is no data stored in a header - there is no header - it is just compressed data and as far as I can tell the width and height are determined from the structure of the data at a later time. You can get TIFF files that surround the JPEG compression and have very rich tag content then but the jpg file - so called - is just data. It may be that people are now calling this TIFF file a JPG file - which is now really confusing things.
|
|
|
|
|
I am writting a simulation program that represents components using images (bitmaps) in MFC. There can be several on the screen at a time. I didn't want to change the bitmap size every time the user wanted to zoom in or out in the view.
I am using SetWindowExt and SetViewportExt to do view scaling...works fine except the when I zoom out (bitmaps get smaller than actual size) the bitmaps begin to look bad. Does anyone know how to do the view scaling so that the bitmaps don't look so bad while zoomed out. I know that there are algorithms that can do bitmap scaling, but I wanted to avoid rescaling every bitmap each time the user changes view scales.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Wich APIs are you using for drawing the bitmaps? In the past I've used DrawDib functions[^] and they were far superior than good old BitBlt and familiy.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
TransparentBlt
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
The bitmaps look bad because you start getting sampling artifacts in the windows scaling. It works like this: if you scale down to 5x then it is just going to select one pixel in the 5x5 block. That one pixel is going to have very little in common with the pixel selected in the adjascent 5x5 block - so the image you get is terrible looking. What you need is something that quickly does a bilinear scaling on the original image. You can test this out by going to a graphics software taking an image and scaling it down using various options. The only problem is that this can be slow, maybe too slow for your purposes.
|
|
|
|
|
Hi, there:
I am a new guy to Win32 API. Maybe my question sounds a little stupid.
I have built a display window, which use Win32 graphic API for graphic rendering. Now I need to create a configurable dialog box by using mouse click. By "configurable", I mean that dialog box will be created based on some information obtained from the mouse event, such as coordinates. But I have 2 problems:
1. in the WinProc function, inside the WM_LBUTTONDOWN message section. I use "DialogBox()" function call to generate the dialog box. I have a resource file built by using VC++ 6.0. Is it right way? Do I need to use "GetModuleHandle" function call first to generate hInstance before "DialogBox"? But it doesn't work. When I click the mouse left button. Nothing comes up.
2 in most of tutorials I read, diglog box generation highly depend on the resource file and is invoked by commands, processed in WM_COMMAND section. Are there any other ways to create and configure the dialog box? For example, by mouse clicking, I can have the coordinates. Now I want to create a dialog box, inside which there are a check box that use the coordinates as the caption name.
Thanks a lot! I am waiting online.
|
|
|
|
|
1. in the WinProc function, inside the WM_LBUTTONDOWN message section. I use "DialogBox()" function call to generate the dialog box. I have a resource file built by using VC++ 6.0. Is it right way? Do I need to use "GetModuleHandle" function call first to generate hInstance before "DialogBox"? But it doesn't work. When I click the mouse left button. Nothing comes up.
Post the code of your call to DialogBox and someone will probably be able to determine what's happening.
2 in most of tutorials I read, diglog box generation highly depend on the resource file and is invoked by commands, processed in WM_COMMAND section. Are there any other ways to create and configure the dialog box? For example, by mouse clicking, I can have the coordinates. Now I want to create a dialog box, inside which there are a check box that use the coordinates as the caption name.
Strictly speaking, dialogs can be built in run-time withouht being dependent on any template, but this is really difficult and not necessary for what you want. Store the coordinates somewhere (some global variable, whatever) and, when processing the WM_INITDIALOG of your popped up dialog, get the handle of the checkbox you're interested in (see GetDlgItem ) and change its text with SetWindowText . Good luck.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
The code is pretty simple:
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
......
static HINSTANCE hInstance;
......
switch (msg) {
......
WM_LBUTTONDOWN:
hInstance = GetModuleHandle(NULL);
DialogBox(hInstance, "IDD_ControlBox", hwnd, (DLGPROC)MyDlgProc);
break;
}
.....
}
......
BOOL CALLBACK MyDlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
......
}
|
|
|
|
|
Isn't IDD_ControlBox a macro for an integer identifier? Try with
DialogBox(hInstance, MAKEINTRESOURCE(IDD_ControlBox), hwnd, (DLGPROC)MyDlgProc);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks! Dialog box comes up even though there are still a few things to be fixed. But thanks a lot!
|
|
|
|
|
I can't find any CListCtrl member functions to do this.
Thanks!
|
|
|
|
|
How about SetColumnWidth() ?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi!
I want to create a dialog which resize to only caption when user double-click the caption area, then expand back when user double-click the caption again.
How can we detect that mouse event in the dialog WindowProc? left-click, right-click, double-click?
I tried WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, but it works only in dialog client area.
Thank you,
Sovann.
Everything should be made as simple as possible, but not simpler [Albert Einstein]
|
|
|
|
|
try this,
WM_NCLBUTTONDBLCLK
The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.
Arjan.
|
|
|
|
|
Hi,
I am using an ActiveX in CFormView
The ActiveX keeps on updating its contents and the Parent(CFormView) is not
aware of it, due to which the Parent displays the old contents.
How do I inform the CFormView to update the change so that there is no flicker
while updating the ActiveX . I get lots of flicker with InvalidateRect.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
Hi Sansky!
Your activex control needs to notify its container. Normally in ATL, just call FireViewChange .
ÿFor the bread of God is he who comes down from heaven and gives life to the world. - John 6:33
|
|
|
|