Click here to Skip to main content
15,891,248 members
Everything / Resize

Resize

resize

Great Reads

by trekhleb
JavaScript implementation of so-called Seam Carving algorithm for content-aware image resizing
by ASP.NET Community
Hi,In this article i am going to create an http Handler which is used to resize my images and display it  .What are HTTP Handlers?HTTP handlers are
by Member 10974085
VB.NET - Resize and Reposition all controls when Form is resized
by seyyed hamed monem
Move and resize controls on a form at runtime (with mouse)

Latest Articles

by trekhleb
JavaScript implementation of so-called Seam Carving algorithm for content-aware image resizing
by Mehedi Shams
Design to scale automatically to different screen resolutions
by Member 10974085
VB.NET - Resize and Reposition all controls when Form is resized
by NightWizzard
Simply add a single code module to add instant design capabilities to all windows forms of your application!

All Articles

Sort by Score

Resize 

19 Jan 2022 by trekhleb
JavaScript implementation of so-called Seam Carving algorithm for content-aware image resizing
5 Jun 2012 by ErnestoNet
You don't need to create a DC (pMDC). Just use the DC from sm_img (sm_img.GetDC()): CImage img; CImage sm_img; HRESULT res = img.Load(jpgFileName); CDC *screenDC = GetDC(); int iNewWidth = 80; int iNewHeight = 60; sm_img.Create(iNewWidth,...
25 Apr 2013 by Sergey Alexandrovich Kryukov
You were really, really close. You picked unrelated style, controlling maximize operation. Resizing by the border is controlled by another bit, WS_SIZEBOX, same as WS_THICKFRAME. You have to clear this bit. Please...
5 Jun 2012 by CPallini
See, for instance, here: "Scaling CImage"[^].
19 Sep 2012 by brownii
g_pDirect3...
21 Sep 2012 by Santhosh G_
OnSize(UINT nType, int cx, int cy){ // Set viewport widht as cx, and height as cy glViewport( 0, 0, cx, cy ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0, cx, cy, 0, 0, 1 ); m_nWidth = cx; m_nHeight = cy;}You need to redraw all...
8 Oct 2012 by lukeer
MouseHover[^], MouseClick[^] and MouseLeave[^] are all events of the System.Windows.Forms.Panel[^] class. You can subscribe a method to each of them and in those methods, set the panel's Location[^] and Size[^] properties as you wish.
8 Oct 2012 by OriginalGriff
"following i have tried: private void Panel_Extras_MouseHover(object sender, EventArgs e) { Panel_Extras.Height = 750; Panel_Extras.Width = 40; Panel_Extras.Location = new Point(1410,0); }but thats bad in my mind, cause the window could change his width, this i ment...
22 Apr 2013 by Filipe Marques
Hi, if I understood, you want to update the frame when the window is resized.You must use the ComponentListener Interface and in componentResized(ComponentEvent e) method, you must update yours h and w variables and then call repaint method.Best reguardsFilipe
18 Jun 2013 by Zoltán Zörgő
You are asking about two different things:A) Resizing an image is an image manipulation, and has nothing to do with the part where you manipulate the image data itself. You can use the built-in methods like described here:...
18 Sep 2013 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
If you want the same TextArea in Asp.Net, then you can directly use that in the page. Just add the HTML in aspx page, it will render as it is.In case you want to access the control on Server Side (Code Behind), then add a runat="server" attribute to the TextArea like below.
14 Nov 2013 by José Amílcar Casimiro
Hello Lima3,You're using this method to save the image:public void Save( Stream stream, ImageFormat format)Instead of using a MemoryStream, use a FileStream.http://msdn.microsoft.com/en-us/library/system.io.filestream(v=vs.110).aspx[^]JAFC
13 Jan 2015 by shaw2thefloor
Have you had a look at blueimp's jQuery file upload plugin....I think it will do exactly what you want. https://github.com/blueimp/jQuery-File-Upload/wiki/Client-side-Image-Resizing
19 Sep 2019 by Sarim Mughal
You should find image in gridview row Image image = GridView1.Rows[i].FindControl("image1") as Image; //OR Image img = (Image)GridView1.Rows(e.RowIndex).Cells(7).FindControl("image1");
25 Jan 2016 by Luiey Ichigo
Solutions have been found.Private Sub ExtractImages() Dim listpath As String = "D:\image folder\image-list\" 'First line was retrieve blob from mysql database Dim mybytearray As Byte() = arr_imagelist.Item(0).arr_image Dim name As String =...
4 Jun 2012 by Lam Giang
I want to resize a bit picture saved in a file with the following code CImage img; CImage sm_img; img.Load(FileName); sm_img.Create(80,60,img.GetBPP(), HDC sm_hdc =...
18 Sep 2012 by brownii
Picture(Left...
21 Sep 2012 by TheArchMage
I'm trying to setup an OpenGL window to have the the top-left corner 0,0 and the bottom-right corner the width and height of the window (pixels not percentage). And when resized nothing drawn is scaled, instead the window area is enlarged/shrunk. It's for drawing 2D images. I'm using the Windows...
8 Oct 2012 by niko_tells
hey guys, if you reccognized im new here and i would appriciate that you tell me if im doing something wrong here! Thank you =)So i will come to my problem, imagine a window with pictureboxes and amount of click events etc.Now i have inserted a panel with the height of the window,...
12 Mar 2013 by Rupesh Kumar Tiwari
You can declare cursor property like below: $( "#draggable" ).draggable({ cursor: "move", cursorAt: { top: 56, left: 56 } }); see more onhttp://jqueryui.com/draggable/#cursor-style[^]
18 Mar 2013 by gouravkaila
Hi,I am trying to resize my frames on run time using mouse drag like the same is possible in Div.Is there any way for that or any link?
22 Apr 2013 by dteece1
I'm working on a java program that will display 4 black squares in a certain pattern, and have them scale proportionally with the frame if it is resized. I have drawn the first two squares, however I am unable to draw squares on the right side or bottom of the frame while still making them scale...
27 Aug 2022 by ShahadBattar
I'm using C++ openGL and I need my window size to remain constant.I've used the following function to disable the maximize button:void toggleGlutWindowMaximizeBox(char *szWindowTitle){ long dwStyle; HWND hwndGlut; hwndGlut = FindWindow(NULL, szWindowTitle); dwStyle...
10 Jul 2013 by xmark1rax
Need to resize div on window resize, basically I want to change between two fixed width: 600px and 1000px. So if 1000px do not fit the screen - change to 600px.NOTE: it is important to keep width fixed.The code I was able to find/edit in the internet: $(window).resize(function...
10 Jul 2013 by xmark1rax
Thanks Matej Hlatky, it helped a lot.)))Not sure if I did it right, but here is the code:#container { /*css styles*/ width: 600px;}@media (min-width: 1020px) {#container { width: 1000px;}}It overwrites the first width.
31 Jul 2013 by matimont
Hi,I have a Windos Form, then a TabPanel, then a Panel and inside that panel I have multiple pictureboxes. How can I resize the pictureboxes so they adapt when I resize the window?Thanks a lot
31 Jul 2013 by Sergey Alexandrovich Kryukov
If you are talking about automatic resize of any control, you can usually have it docked to some other control like Panel (or a Form, TabPage and others) which itself would be resized. You need to use Dock property with the value...
18 Sep 2013 by Naga Sindhura
Hi Friends,I am trying to implement TextArea in my Asp.Net Web Forms.Demo - http://jsfiddle.net/W7Rmv/[^] Please check this fiddle with Chrome or Mozilla. When I am trying to implement same TextArea, it asking rows and cols in aspx page and it is not working in IE.What I have...
18 Sep 2013 by Member 10186638
use css like this#txtArea{ border-style:dashed; border-color:red; resize:none;}
11 Oct 2013 by ASP.NET Community
Hi,In this article i am going to create an http Handler which is used to resize my images and display it  .What are HTTP Handlers?HTTP handlers are
18 Mar 2014 by DoingWork
Dear all,I'm biggenner in programming world.....My development PC's LCD size is 17-inch. I develop application which fits to my LCD. Every controls is placed at proper place and whole screen area is used.Problem is that end-users of this application has different screen size i.e....
18 Mar 2014 by OriginalGriff
Basically, you can't. It's not the physical size of the screen that is the problem, but rather the resolution at which you application is being displayed: with can vary from (say) 800 by 600 to 2,560 by 1,600 - which is not just a change in resolution, but in shape as well. Since your form is...
18 Mar 2014 by Sergey Alexandrovich Kryukov
Consider the following HTML, without any Javascript and CSS:This is the example of fluid HTML Isn't that obvious: if you resize the browser window, this content is shown properly and remains readable for almost all sizes? Conclusion? Keep it...
3 Jun 2014 by Member 10863144
I am trying to allow the client to re-size the Label"Text-size" at runtime, the JQuery resizable isn't working, it only worked on textbox's/ dropdownlists and so on, but for the Label it did not work; Any suggestions?
3 Jun 2014 by HK33
Move and Resize Controls on a Form at Runtime (With Mouse)[^]
4 Jun 2014 by Member 10863144
Thanks to stackoverflow;.lbl {display:block}...... $(function() { $( "#label" ).resizable({ resize: function( event, ui ) { var...
13 Jan 2015 by Member 11092009
I have been making a project and I need to upload an image. When the user selects images, 300x300 size images will be uploaded. When finished, 700x700 size of same images will be uploaded. Finally the original version of the images will be uploaded to the server.In short user will select...
21 Jun 2015 by SrgjanX
Why for example, when I load a child form in my MDI container, the form is auto resized?It really need to be perfect looking and thats why i asked here, maybe someone had this problem before and knows the solution, this is how i see the child form in my visual...
21 Jun 2015 by Dave Kreskowiak
One, from hat you've shown, you shouldn't be using MDI at all.Second, if you have just ONE child form maximized in MDI, ALL child forms are maximized. This will resize your forms to fill the MDI client area. You cannot turn that behavior off. Like I said, nothing you're shown justifies using...
19 Sep 2015 by Faisal_Abdullah
Hello, friends i am working on a website, in which i had solved many things, but from last one week i am facing a problem. first check the following div ...
29 Sep 2015 by sijila
Hi,I have an web application in c#.It is having an image folder. I want to re size those images dynamically depends up on the request.(some times it is 180* 180 or 566 * 566 etc) and show in a "img" control no need to save anywhere.Only for display .Thank You
20 Sep 2015 by OriginalGriff
I assume you are doing this to show a thumbnail or similar?If so, then personally, I'd create a folder called "thumbnails" and save a thumbn to that, cross referencing the thumb to the full image - that way you only do it once.But...either way, the Image class has a GetThumbnailImage...
5 Oct 2015 by Mr_cool
I am following this tutorial: http://www.aspsnippets.com/Articles/Capture-Image-Photo-from-Web-Camera-Webcam-in-ASPNet-using-C-and-VBNet.aspx[^]I want to know if I can capture square images. Right now my webcam is capturing 320*240 size image.I need to capture square image based on...
6 Oct 2015 by nkphuc700
I am creating two radwindow dialogs: a parent and its child. Parent radwindow has size 1082x630Child radwindow has size 1500x900On parent radwindow dialog, when I click on button "Show Child Dialog", its child radwindow will be shown.The problem here is the size of child dialog...
7 Oct 2015 by nkphuc700
I solved the problem myself, guys. I just added one more line at the end of the resizeRWndDialog() as the snippet code below:function resizeRWndDialog() { //......... if (numsOfRadWindow > 0) { //........... } GetRadWindow().center(); // >> Just use this line}
17 Mar 2016 by Member 11914749
I have a report in SSRS which has multiple images in different sections of the report. These images may not be of the same height and width. I am trying to fit these images proportionally in image control on the report so when the image is wider than the page it fits it in the image box but...
19 Jul 2017 by Patrice T
Quote: I want to do Automatically decrease the size of the photo to Exact 2 MB if the photo is > 2 MB without changing the width,height and quality. It is just impossible. width, height, quality and size of an image are linked, you can't change one without changing another. Quote: While...
19 Jul 2017 by F-ES Sitecore
You'll probably have to save the image as a JPG and check the file size, if it's too big save it again with a higher compression, check the size and so on. Code for changing compression ratio can be found here How to: Set JPEG Compression Level | Microsoft Docs[^] pseudocode would be...
27 May 2018 by Sayan Bera
On an image(x by y), a QGraphicsRectItem is added, Let say Qrect(73, 77, 43, 28) Qrect(x,y,w,h). After resizing the image to 128 by 32, how this QGraphicsRectItem can be redrawn with proper co-ordinates. The image is first resized, and then the graphicsRectItem to be added. The grey area within...
19 Sep 2019 by dhjoubert@gmail.com
I have this and it works to resize the rows in the gridview so that if there is an image, the row will be 10 and if there is an image the row height will be 100, but when there is an image, the image stays at 10 even though the row height is 100. How do I get the image to resize to 100 in the...
15 Apr 2020 by Richard MacCutchan
You were given the answer a few weeks ago at https://www.codeproject.com/Questions/5262861/Vcplusplus-resize-all-controls-when-form-is-resize[^].
1 Feb 2023 by Graeme_Grant
See if this helps: Image Resizing - outperform GDI+ | CodeProject[^] UPDATE #1 Try: GitHub - mono/SkiaSharp: SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D...
3 Sep 2015 by Member 10974085
VB.NET - Resize and Reposition all controls when Form is resized
13 Jan 2014 by seyyed hamed monem
Move and resize controls on a form at runtime (with mouse)
28 Jun 2015 by NightWizzard
Simply add a single code module to add instant design capabilities to all windows forms of your application!
28 Apr 2014 by Declan Bright
A technique which ensures that an ASP.NET GridView displays nicely on small screen devices.
1 Jun 2013 by BBGq
Making the sizes of the controls change automatically when resizing the form.
17 Oct 2016 by Mehedi Shams
Design to scale automatically to different screen resolutions
1 Feb 2015 by Serge Jerkezian
How to upload, rename and resize in MVC
17 Dec 2012 by bEGI23
This code allows to drag and resize a borderless form!
19 Jul 2017 by OriginalGriff
You can't, for two reasons. 1) You can't change a file while or before it's uploaded - C# code only runs on the Server, not the client - and the server has no access to the data until the upload is complete. 2) If you could always make an image smaller without affecting the height, width, or...
12 Mar 2013 by geethika amu
HelloI am doing a project in that I need drag images from drop down list to container after dropping on to div the image should be selected at the same time it have to show anchors for re sizable and rotatable.I have done till drag,drop and clone of images (in that the image is going out of...
31 Jul 2013 by woopsydoozy
I assume this is a Windows app? The Anchor properties of the controls determine how they behave when the form is resized. Just play with those in the Properties window and try it until you get the behavior you want.
8 Oct 2012 by Jimmy Darji
If you have a panel then it will use like it . . .pnlPopUp.Visible = true;pnlPopUp.Height = 1100;pnlOffer.Style.Add("top", "180px");pnlOffer.Visible = true;
24 Oct 2014 by BilalSarwar
Hi Everyone,I required an image control which can upload,resize and crop the image and all this is should be done on client side. If anyone know about such a control or he/she has the best one, i'll be really thankful if you will share it please. Or refer me to the purchasable version of that...
18 Jun 2013 by Jerrell77
Hi anybody have any idea how to resize an image that was uploaded? does it require 2 database tables so that the edited image is saved to a different table?How do i get the new image that was resized?? any solution will be greatly appreciated!
14 Nov 2013 by Lima3
I have to re size an existing image and with proper width and height.for now this is the code I have the code like this Image resized = ResizeImageForFull(original, new Size(768, 1024)); //save the image to memory stream MemoryStream...
21 Jan 2016 by Luiey Ichigo
Hi,I have convert a bytes received from database to image file. After that, I will get the image dimensions to check either width or height is exceed the maximum width/height.If the width is max 1000px and saved image is 1200px, I need to resize the width so it not reach the max...
19 Jul 2017 by Member 13318210
I have a web application.I want to implement the following Functionality ,Hope You guys Help me: While Uploading an image File,I want to do Automatically decrease the size of the photo to Exact 2 MB if the photo is > 2 MB Compromises with image quality,height and width. How implement this...
27 Aug 2022 by Member 3203938
Process Non-Client HitTest Add ON_WM_NCHITTEST() to MessageMap LRESULT OnNcHitTest(CPoint point) { LRESULT oHitItem= __super::OnNcHitTest(point); if(oHitItem >= HTSIZEFIRST && oHitItem
31 Jan 2023 by w14243
E.g. Resize an 8000x8000 big size image to 500x500 small size image, below C# .NET methods were tested: 1. Bitmap smallimg = new Bitmap(bigimg, 500, 500); 2. Bitmap smallimg = bigimg.GetThumbnailImage(500, 500, ...); 3. Bitmap smallimg = new...