how we can a split a image in different images
4 2727
Hi
pankaj mishra
Welcome to TSDN.
You have reached the right place for knowledge shairing.
Here you will find a vast resource of related topics and code.
Feel free to post more doubts/questions in the forum.
But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.
It will help Experts in the forum in solving/underestanding your problem in a better way. While posting please follow posting guidelines and use proper CODE and other tags to make your post more readable.
how we can a split a image in different images
and again, moved to the .NET forum .
While I can't think of a fast way to do it off the top of my head, the Bitmap object (combined with the Graphic object) should contain the methods you need to split up images
Hello
If you want to split image for 2 or even cut out few images from one image to others I would go with this approach. -
Bitmap bmpToSplit = ...; // bitmap to be splitted
-
Bitmap split1 = new Bitmap(w1,h1,bmpToSplit.PixelFormat);
-
Bitmap split2 = new Bitmap(w2,h2,bmpToSplit.PixelFormat);
-
Graphics g1 = Graphics.FromImage(split1 as Image);
-
g1.DrawImage(bmpToSplit, new Rectangle(0,0,w1,h1), new Rectangle(xSplit1, ySplit1, w1,h1),GraphicsUnit.Pixel);
-
Graphics g2 = Graphics.FromImage(split2 as Image);
-
g2.DrawImage(bmpToSplit, new Rectangle(0,0,w2,h2), new Rectangle(xSplit2, ySplit2, w2,h2),GraphicsUnit.Pixel);
-
THe Point(xSplit#,ySplit#) is coordinate where first image is on original bitmap.
There is a lot things you can do with images with Graphics class.
cheers
AkipNG
Sign in to post your reply or Sign up for a free account.
Similar topics
by: William Starr Moake |
last post by:
Is there a script to convert image file paths from absolute to just
img src="imagename.jpg"? This is for an IE-based WYSIWYG editor. The
doImage execCommand produces an absolute file path, which...
|
by: SPG |
last post by:
Hi,
I wrote a little bit of script that loads an image from a thumbnail when the
thumbnail is clicked.
It is not very clever, and I have found it only works in IE..
could someone have a look...
|
by: Manish Songar via .NET 247 |
last post by:
I am using asp.net. I am not storing image in sql server.I store all
the image in one folder. I want to access image from that folder to my
client machine. Images folder (\Orchid_Image) store in...
|
by: dineshbajaj |
last post by:
Hi Everybody,
I need to split an image file(*.jpeg) programmatically to nine or more
equal parts.
Since, the code is meant to run on Windows Pocket PC 2002, I can only
use methods supported...
|
by: Dan |
last post by:
Hi,
I was wondering if anyone could come up with a cross browser image
transition that I could use... I have already made one that works in IE
but i know it doesn't work in Mozilla Firefox.
...
|
by: Kim |
last post by:
Random image downloader for specified newsgroup. Hi I'm writing a small script that will download random images from a specified newsgroup. I've imported yenc into the script but I can't open the...
|
by: Dionysusmtl |
last post by:
I'm working on a flash portfolio that loads examples of our work (jpgs) into a movie.
For example, it started off using an xml list to display certain images but I found it necessary to draw info...
|
by: smarsh |
last post by:
Hi,
Someone put together a small perl script for me that uses day and time to determine which of two images to display (open.gif or closed.gif). I need to modify the script to also include a...
|
by: sarika |
last post by:
Hi All
i m making a web site having number of big images. My requirement is i
want to dunamically split the images while downloading so that my
website works fast and image downloading does not...
|
by: neovantage |
last post by:
Hey all,
I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |