Selecting an icon from an image grid - c++

I have a grid of icons and I want to select an individual icon and save it in separate image file. The image doesn't need to be processed further just simply split apart. Any thoughts on how to let the computer do this work for me?

For Windows, Bitmap::Clone will do it for you. MSDN Link

Related

QT - Select section of image

I'm using QLabel and QPixmap to show image in my program. I would like to use something like snipping tool in Windows to let user to select part of image that will be processed further.
For example, I load image, user select part of it (rectangle), and it shows it is selected and I can read coordinates that are selected, so I can proceed with processing only part of image.
I don't think this is possible with Qt without a fair amount of coding.
Maybe a third-party Qt widget, such as https://github.com/dimkanovikov/ImageCropper, is what you're looking for?

MFC ribbon large images resource on multiple rows

I'm working on a ribbon application and I need lots of icons for each category. If I put all the images for the category on the same row it becomes too wide, i.e. difficult for maintainance when I need to add/edit something. So my question is: is there a way to put the images on several rows? Thanks!
There is no way to put images on several rows.
The toolbar mode to manipulate tiles of the bitmaps isn't available on demand.
I use a different tool to manage such bitmaps (i.E. Axialis)
Axialis Icon Workshop is a good choice. Try to get the free version somewhere: It has everything you need for ribbon icons, including good alpha channel handling.
If you really insist on using smaller bitmaps, you could use an alternative constructor to associate icons to your UI elements:
CMFCToolBarImages smallerIconGroup; // load some bitmap ressource into this object
...
CMFCRibbonButtonEx myButton = new CMFCRibbonButtonEx(ID_MYCOMMAND, _T("My Button"), smallerIconGroup.ExtractIcon(0));
OK, I saw Axialis. It looks good, but for now I'm sticking to Gimp :D If I see the icons are too much, I'll check the portable version.

Add text to a picture using photoshop

I want to know if exist templates to add text on photoshop like in the following pictures:
http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash4/485070_566956359990277_263279122_n.jpg
https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash4/3263_403189956409783_609225582_n.jpg
Could you suggest some pages where I can study and try those effects ?
Thanks.
Step1: Find the fonts. Search on font sites for similiar fonts or try to cut out the font and upload it to http://www.whatfontis.com/ or http://www.myfonts.com/WhatTheFont/
Step2: just play around with blending options and stuff.
from what I can see it's these settings you want too look at:
"Notche Latina": Gradient overlay, white stroke and black dropshadow.
"photo recoblablabla": inner shadow and might be in overlay-mode or something
"Festival de la bira": once again, white stroke
First make a layer adjust the objcet on layer as per your requirement.
Add some effects from filter gallery if you required (or layer style).
Click on the text toolbar type your text (required text).Then to apply effects
right click on text layer and click on rasterize type.now you can add effects from the filter gallery to the text.(or Layer style eg-inner shadows,bevel and emboss).

Icon with different resolution in MSVC2010

ALL,
I am making an application where I need to use an icon.
I have 2 icon files: myicon-16.ico and myicon-32.ico. First has resolution 16x16 and second - 32x32.
Now when I opened MSVC 2010 project (C++) I see that the default icon file has 2 icons combined, i.e. it has a resource for 16x16 and 32x32 in one file. What I mean is when I open the resource file in Visual Studio solution and click on the standard icon I see many different resolution for the icon. And I can select each and the bitmap (icon) will be displayed with an appropriate resolution. But when I open the rc file in the text editor I see only 2 lines: one with my own icon and one with the standard icon "IDI_SMALL".
What I need to do to make the same thing with my 2 files? What I want is when I open resource file in VS and click on my icon resource I want to see 2 icons with 16x16 and 32x32 resolutions. AFAIU, I can only place an additional icon resource in the rc file. Or I am wrong?
Please advise.
You can use VS2010 to add additional image types in your ico file. Just open an ico file with VS2010. Say, open myicon-16.ico. You will see just one icon there - 16x16. Now open menu Image->New Image Type (or use right click->New Image Type, or use keyboard shortcut Ins). You will be presented with a choice ranging from 16x16 1 bit to 128x128 24 bit. Just insert as many as you like.
For your case you need to insert an empty 32x32 into myicon-16.ico, then copy and paste from your 32-pixel file.
On the side note. Who draws the icons nowadays. Just google free icons, and you will find tons of icon libraries on the Internet with sizes from 16x16 to 256x256 png.
Yes, you need to combine your images into one ICO file that has all the data.
From Wikipedia:
ICO files contain one or more small images at multiple sizes and color
depths, such that they may be scaled appropriately.
There are many image editors that can do this, personally I've used GIMP to create multi-layered png files, and then save as .ico to get the final result.
You also should be able to right click in the list of image sizes in VS2010 and then click "New Image Type" to add different resolutions within the built in ICO editor. You can then copy and paste your image data from another editor into Visual Studio.

Is there a way to make c++ console text larger?

I'm making a random number generator, the program will create several random numbers and then choose from those random numbers and then displays that number in the window.
I was wondering if there was a way to make that specific piece of text bigger?
I don't want to change the size of all of the text in the window as I have writing in the window that i don't want to change the size of
Thanks for any help you can give
No, but you can make it bold, change the font color, or the background color for the specific text. If all you want is to make that specific piece of text stand out, I'd go with colorizing it.
As for how to do that... It's platform dependent. What platform are you on? Windows? Linux? What shell?
Take a look at the Windows Console API. That should have what you need.
Console text doesn't allow for the rich formatting you are referring to. You would have to move to a graphical output to render the size differences.
Generally, programs can't control the size of the text in the terminal. You may be able to change the color of a specific part of the text, though. Search for terminal escape sequences for information on how to do that on various terminals. Some terminals also handle bold, italics, and underlining.
No, but instead you can change colors of text and text's background. Will this be a good solution for your problem? There are a lot of specific examples available in the internet.
A possible console mode solution could involve FIGlet. You can tweak the output to write in many different fonts.
The output is larger, but no guarantee that it's suitable for your application.
open your console app, go to system menu of console window (left top corner, right click), font tab, choose what you wish. next time you open this (!) console app the font will be as you selected, other console windows are not affected
Right Click the top bar of the window
Click Properties
Click Font and select your font size
This isn't through the code but it will help for your pc.