Is it possible to resize the cropped image before uploading it with CropperJs? - cropperjs

I can't see anything about resizing in the docs, although they have an example of "maximum cropped dimensions".
Any idea how to do that?

Yes, you can.
When getting the cropped canvas, you can specify your desired size and then send to server or do whatever
getCroppedCanvas is the method you may want to use with specifying width & height of your resize

Related

I want to set an Image to the TabBarItem

I try to set an Image for TabBarItem, but the Image always appear with the original size even though I resizable with other size

SHGetImageList returns an icon that is too small for the size

I'm trying to retrieve file icons on Windows. I follow this guide http://pogopixels.com/blog/getting-the-48x48-or-256x256-icon-of-a-file-on-windows/
I use SHIL_JUMBO to get the maximum size possible. However, not all icons returned are big enough, such as the QuickTime icon in the attached image. The size of the whole pixmap returned is still 256x256 but it does not fill the entire space. My program will then scale it down, making it too tiny to see.
I'm wondering if I can retrieve some extra info such as the size of the original icon, so I know that it's too small to scale down.

GDI+ : Changing DPI

I have two points that i need be to be clarifief on :
changing image DPI from 200 to 100 does it mean that i have to resize the image by half or i could keep the actual dimensions but decrease the DPI.
I herd that GDI+ could be a nice alternative to change the image DPI, i googled in that way but i found no example showing how to change the DPI with GDI+.
Any Idea about those questions, and thank you.
Changing the dpi of an existing image doesn't make much sense. It records the resolution of the device that created the image. So that it can be displayed at the same physical size on another device with a different dpi setting. Which is how an image you drew in a painting program on a monitor with 96 dpi doesn't turn into a postage stamp one-sixth the size when you print it on a printer with 600 dpi resolution.
By changing it in your code when you already have the image, you are basically trying to change the characteristics of the device that created the image. That doesn't make sense, your code cannot reach back and, say, change the CCD in the camera or change the monitor resolution.
It's just a reference number.
You can display or print the image at any size you want, it doesn't have to match the original size.

How to stretch a bitmap image to some specific Co Ordinates using WIN32 core and VC++?

I just want to create a program which crops an image and sends the cropped image to some remote location.
I have loaded the image using BitBlt(). I dont know, How to uniformly display all the images ? all of same size. stretching is allowed. I have created a static control and now I want to display all the images inside this static control only...
I am able to display images using STM_SETIMAGE, but the problem is that images are not displayed uniformly. So I thought to resize the images before sending them to SendMessage(). I have tried BitBlt() and StretchBlt() but I dont know why nothing works in my code.
The detailed Code
Any Help, will be appreciated...
Thanks in advance,
You might want to try using StretchBlt() instead of BitBlt(). It allows you to specify the source and destination rectangles which will crop and stretch the image.
http://msdn.microsoft.com/en-us/library/dd145120(v=vs.85).aspx
If you store your image internally as a DIB, using StretchDIBits() would be my recommendation.

Need a way to display image and draw on the image in Visual C++

The current way that I found was to make a bitmap and paint it into a picturebox,
but there it is very slow when trying to scroll the panel (the picturebox is inside a scrollable panel).
Is there a better way to achieve this functionality?
Load the bitmap only when your picture box is created, then leave it in memory until the picture box is destroyed. Loading the bitmap every time OnPaint is called will destroy performance.
Also make sure you aren't re-painting your bitmap if you receive a WM_PAINT message and nothing has changed.
That image size, 1500x2000 will be slow. How about resizing it to 25% to show a preview and if a user wishes to see the whole image give them an alert it may take some time.