VS 2008 Cropping An Image?

Sep 16, 2011

I'm playing with creating thumbnail images for my photo website using VB rather than Photoshop. I've found some great code for resizng jpegs whor this one:

Imports System.Drawing.Drawing2D
Public Class ImageResizer
Public Shared Sub ResizeImage(ByV

[code].....

View 2 Replies


ADVERTISEMENT

VS 2008 Cropping An Image

Sep 14, 2009

I'm playing with creating thumbnail images for my photo website using VB rather than Photoshop.[code]However, I'd really like to be able to crop images to a square shape - same width and height - from a starting image that might be 1000 pixels wide x 667 high, 500 wide x 750 high or already square and around 750 x 750. In other words, crop a square from the central area of a jpeg image, irrespective of it's exact size.

View 3 Replies

Image Cropping Using Picturebox?

Jun 8, 2011

how can i crop an image based on the size of my picturebox?

my picturebox's size mode is normal, i want to have for example, a 100 x 100 image using a 100 x 100 picture box, also i can drag the the image inside the picturebox so that i can have a focal point, a center of the image that i want to crop on.

View 3 Replies

VS 2010 Auto-cropping An Image?

Jan 20, 2012

In my code I am taking a screenshot of a CAD screen. The image consists of various colored entities on an all-black background. I would like to find the extents of the non-black pixels in all four directions & crop the image to those extents or maybe a few pixels beyond.

View 9 Replies

Using System.Drawing To Make A Selection Tool, And Cropping An Image In .net?

Sep 4, 2009

If i wanted to crop an image in VB.net, how would I go about doing it? I am trying to let the user drag out the box they want (system.drawing.rectangle), and it will automatically remove the edges surrounding the box.

My first problem is primarily the fact that I cannot make the system.drawing.rectangle visible. It is not displaying at all, I am setting its location and height programmatically, but nothing is showing up. I know there is probably something fairly obvious I am missing...but I cannot seem to find it.

My larger issue, however, lies with the cropping itself. I cannot find any crop methods, at all. Is there a hidden one I am missing? Or must I code it myself? How would I go about doing this? It ought to be able to output to a bitmap image object.

View 2 Replies

VS 2008 Label Text And Number "cropping"?

Mar 18, 2009

Ok, I am trying to figure out how to crop a number, from a label, even though that label has text in it.For example: Label3 reads testing 123I would only want the 123 bit straight from the label so I can use it there and then without

View 15 Replies

Screen Capture With Cropping?

Jul 26, 2010

how would I allow my screen capture to crop and capture only a particular area of a screen?The user should be able to select the area they want to crop. It would be good if the cursor changers to a plus like other screen captures and also the screen is all paused so the user can select the area they want.v

View 4 Replies

Rendering 2D Map In Game - Cropping And Scrolling

Jun 21, 2010

I'm in essense trying to make my own interpretation of the NES hardware, so I can make a game that ideally would resemble what a NES game would look like. I'm currently stuck with how to adjust how to draw the playfield to the video memory (back buffer).

Backbuffer: The NES had restrictions on the nametable, or backbuffer. For my example, the backbuffer is 256x240pixels big, or the size of one screen. If I drew this to the TV, it would fill up the screen perfectly. Now, if I drew this to the screen with an offset of X=5, the entire image would be shifted and would wrap around the screen.

For example.....
ORIGINAL, NO OFFSET: DRAWN WITH OFFSET OF X=5:
ABCDEFGHIJK GHIJKABCDEF
DRAWN WITH OFFSET OF X=-5:
FGHIJKABCDE

The screen is split up into squares 8x8 pixels each, totalling 32x30 rows and columns. (256x240 pixels). The offset is represented in pixels - not columns; so in theory, I could offset the screen by 5 pixels and every column would be shifted to the right by five pixels.

Level Design: My stages are made up of screens, containing data that is represented in 16x15 rows and columns, each by 16x16 pixels. This is to emulate how many NES games stored level data - each tile holds info about what should be in each 8x8 block.
E.g.:
AA
BC with A,B,C,D representing what 8x8 graphic should go where
Level design is represented by this as well, with each number being a different screen and - meaning nothing, null.
-----
-123-
---4-
--54-
-----
Character Replacement: This is easy. I already know how I can determine which table, row, and column my characters are on based on their absolute positioning. I can also determine the relative positioning within the screen.

With this info, I can easily figure out which columns are to the left and right of the character, if any (if the character is at the left side of screen 1, thered be no more level left). How do I draw my levels to the screen, so that they scroll from one to the next. It would be relatively easy to draw one full screen at a time, and when the character gets to the edge just flip to another screen. However, the problem I'm conceptually having is that I need to 'stream' the level data onto the screen. That, lets say the character moves 24 pixels to the right. The BG needs to move as well. So, I need to adjust the scrolling of the backbuffer by 24 pixels.

However, just scrolling alone will cause the screen to wrap over, diplsaying old portion of the level. So, while scrolling I need to make sure to draw new pieces of the level to the back buffer. But before I can do that, which tiles need to get drawn first. And if the person goes 24 pixels to the left, I need to redraw tiles onto the backbuffer and change the offset accordingly as well. And let's not forget that if the character moves right and there's no more level data to be drawn, there should be no offset but instead the character gets closer to the side of the screen (instead of being centered in the middle of the screen via the X axis).

View 2 Replies

Cropping Tool For Picture And Aspect Ratio

May 18, 2012

How can I build a cropping tool such as the one in Office Picture Manager as seen below? Notice that as soon as the Aspect ratio is selected a cropped area shows on the picture that can be dragged to the perfect position creeping the aspect ratio in tact. This is why I wanted somehow to link my app. to Picture Manager. I want the picture to open in Picture Manager, cropping tool already selected, ready to be dragged to the perfect position. Unless you have some code that can do jut this.

View 12 Replies

VS 2008 Finding If An Image Control Has An Image Loaded (flashing An Image With A Timer)?

Aug 14, 2011

I'd like to verify if an image control has an image loaded . If it does , I want to unload that image (and load no image) , but if the image control has no image loaded , I want to load an image . Is it possible ?

If ImageMY.Image.Equals(Nothing) Then
ImageMY.Image = System.Drawing.Image.FromFile("C:ImageBlaBlaBla.jpg")
Else

[code].....

View 3 Replies

VS 2008 - VB BITBLT Equivlant - Build Image By Opening Files With Image Data

Nov 2, 2010

In VB6 you could BITBLT things around before refreshing the screen. In .NET, I'm aware of DrawImage, but that can only be done on a paint event rather than before anything gets painted. The issue I have is, I need to open several files with image data in them and then build a bigger image with those smaller images. Before I could open them, BITBLT them to a Buffer. As far as I can tell .NET offers no way to do this as the only function I've been able to find (DrawImage) only works within the paint event. Is there still a way to do this in VS08 or no?

View 6 Replies

VS 2008 - Image Transparency - Loading A Bunch Of Pictures On Top Of One Image

Oct 14, 2009

Ive been programming in VB6 for years, i figured its time for an upgrade. Here's what im doing, and what the problem is:

Im loading a bunch of pictures on top of one image. They are all PNG files, and some of the images have transparent edges, and some semi-transparency within the image itself.

So basically, i need to be able to load these images on top of the other images, and still maintain the transparency.

Is this possible in VB08? This is one of the main reasons i moved to 08 from vb6, more things possible including multithreading.

View 11 Replies

VS 2008 - If An Image Is In Listview, Will It Display A Thumbnail Of The Image?

Jun 19, 2009

I need to know how to use listview, I'm having trouble using it.What are listviews uses?What can be listed in listview?What cannot be listview?If an image is in listview, will it display a thumbnail of the image?

View 4 Replies

VS 2008 Draw An Image Using A Separate Alphamask Image?

Sep 4, 2011

I want to draw an image onto another image object but use an alphamask specified from another image that is grayscale.

I am drawing an animation manually so don't want to do this pixel by pixel as this would be extremely inefficient.

View 2 Replies

VS 2008 Get The Image Location Of The Image That The Mouse Is Over (Webbrowser)?

Sep 15, 2009

I'm having a problem getting the src of the image the mouse is hovering over in a webbrowser. I can get an href just fine, just not an src. To get the href, I used this

Something = Webbrowser1.Document.ActiveElement.GetAttribute("href")

When I try to do it for an image, nothing happens. How do I get the image location?

View 2 Replies

VS 2008 Open Image + Save Image + Keep Quality?

Oct 3, 2011

I am trying to edit an image. I can open the image with Picturebox1.load(mypicture)

I can change the pixels/edit the picture by Dim img as new bitmap(picturebox1.image)

[Code]...

now here is the weird part. When I save the image the filesize INCREASES..but the picture dimensions are the same Example... TEST.PNG 1.3KB, when opened up via picturebox/saved the image is now 2.3KB

not sure why...i even though I specify system.drawing.imaging.imageformat.PNG

samething with JPG... it actually SHRINKS it evenmore.. example 88KB jpeg.. saved as jpeg is now 47.7KB...

View 7 Replies

VS 2008 - Read A 16bit Binary File (tif Image) And Pixel Values Of The Image Ranges From 1200 To 4500 - EndOfStreamException Unhandled Error

Mar 18, 2012

I am trying to read a 16bit binary file (tif image) and pixel values of the image ranges from 1200 to 4500. I tried to use BinaryReader using ReadUInt16 but I get EndOfStreamException Unhandled error. ReadByte method works fine with an 8bit tif file. I do not know how to read a 16bit image file using binaryReader. Shouldn't I use ReadUInt16 since values of pixels range from 1200 to 4500?

[Code]....

View 10 Replies

VS 2008 Find Image Inside Image?

Jun 8, 2010

Screen and send are both bmps:This is what I've tried so far but it doesn't work

For y = 0 To screen.Height - 1
For x = 0 To screen.Width - 1
If getpixel(screen, x, y) = getpixel(send, 0, 0) Then

[code].....

View 2 Replies

VS 2008 Find Image In An Image?

Apr 5, 2010

How do I create a program that finds the position of an image that is contained in another image?

View 1 Replies

VS 2008 Getting Image's Name From An Image In Imagelist

Aug 1, 2009

I'm trying to get the image's name from a imagelist..[code]ofcourse that "name" doesn't exists, and I'm trying to find out what another correct way to get the name of that image.

View 1 Replies

2008 : Listview With Image List - Change The Image In The Listview Dynamically?

Jan 15, 2010

I have a listview control. it has an imagelist attached to it with two images in it. I have entered items into my listview, and they are using the first image in my imagelist.... GREAT! Now, there is a variable I have that will tell me which index in the listview is currently active, noting to do with what I select that could be at another index it's just what's being processed by the program at the time in some task.

Create a function that will change the images of all my listview items by looping through them. If the index variable is set to 2, I want the 3rd item in my list view set to use the 2nd image in my imagelist. The rest of the items in my listview need to be set to the first image in the imagelist.

View 3 Replies

Add An Background Image In 2008?

Feb 15, 2011

I'm creating a calculator for a university coursework project and I wanted to know how do you add a background image in the main form in Visual Basic 2008 as I want to have the calculator have a background image similar to one that I programmed when I was studying VB6 years ago (but which I've since forgotten how to program in).

View 3 Replies

VS 2008 - How To Send Image Via TCP

Mar 7, 2010

Im trying to send an image from the server to the client by using network stream. I have looked on google and found out that you can use memory stream and send it, but how do I use memory stream to get the image from the stream and display it on a picture box on the client side?

View 5 Replies

VS 2008 - Using JPG Image For FormBackground

Aug 15, 2011

I have started making the GUI for my app and used a .jpg image for the background. The script download a file that is only like around 2KB, it usually download that file in 2-3 seconds but since I added an image to the form background it takes like 20-30 seconds to download the file.

View 2 Replies

VS 2008 : Download More Than One Image?

Dec 31, 2010

Below is my old thread link and jmcilhinney solaved the problem [URL]But i m in a state where i can't implement / fix my code my question is that how we can USE threadpool class in the inner loop

vb.net
for each m in filename fach s in secondnameThreading.ThreadPool.SetMaxThreads(2, 2) Threading.ThreadPool.QueueUserWorkItem(AddressOf DownloadFile, New String() {url, filePath}) nextnext

I want that it will wait unti all innerloop download completed whent it is done it start reading outerloop again but I m not able to findout how to do.

View 13 Replies

VS 2008 : Place Image On PDF?

Jun 11, 2010

How can i place a IMAGE , lets say a BMP, on an existing PDF file.I need to place it at an exact position on the form, and size it.

View 6 Replies

VS 2008 Add Column Containing Image To DGV

May 16, 2010

I am generating the contents for my DGV by using the following

[Code]...

View 1 Replies

VS 2008 Draw Image From Rgb Value?

Feb 7, 2012

[code]...

but, how to draw in picturebox? i use this code but not working!

[code]...

View 3 Replies

VS 2008 Drawing On A Image?

Oct 16, 2009

I want to draw a line on a image, easy enough in principal the image is a map and the lines is between city pairs?

View 12 Replies

VS 2008 Getting Image From 3rd Party App?

Aug 23, 2009

Some will remember my first thread about extracting an image from a 3rd party application. The solution that was offered was to use the Easy Screenshot class that is in the code bank.While this solution works, there are obvious drawbacks. I'm trying to fully automate this program, and needing the window to come to the foreground, even momentarily, defeats the purpose of it.Is there another way to get the image held in a picture box of a 3rd party application?

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved