473,666 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Divide an image in 4 blocks

Hi,

I'm writing a program that loads an image and then apply JPEG
algorithm on it.
I need to apply such algorithm only to a quarter of the image, possibly
selecting which quarter.

I don't really know how to divide in quarter an image in Java: I think
that if I can divide the image in 4 images then I can use each image
as a quarter, and apply the algorithm as I'm doing now on the original
image.

Can someone help me?

Thank you very much, and sorry for my poor english!
Regards,

Gabriele
Jun 27 '08 #1
1 5052
On Tue, 08 Apr 2008 16:19:07 +0200, _kOws wrote:
Hi,

I'm writing a program that loads an image and then apply JPEG algorithm
on it.
I need to apply such algorithm only to a quarter of the image, possibly
selecting which quarter.

I don't really know how to divide in quarter an image in Java: I think
that if I can divide the image in 4 images then I can use each image as
a quarter, and apply the algorithm as I'm doing now on the original
image.

Can someone help me?

Thank you very much, and sorry for my poor english! Regards,

Gabriele
I've never done it but I can't imagine it's impossible since you can do
it in PHP.

A quick search turned up this:
http://www.java-tips.org/java-se-tip...how-to-crop-a-
subimage-from-an-image-9.html

You should be able to pull the necessary bits out from it for your own
purpose.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3039
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove event to keep the ghost image under the mouse pointer. There are three problems: (1) if the ghost image is dragged so it is partially off the edge of the screen, scrollbars appear. This not only looks bad, it can cause the page to autoscroll...
5
3475
by: Chris Beall | last post by:
I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background....
9
35203
by: Veerle | last post by:
Hi, I would like to divide the whole of my html page in 4 equal rectangles using only div tags in my html. The result should look a bit like this site: http://users.pandora.be/rausbauten/menu/static/start.html only there, a table is used to achieve this result. So using 4 div blocks and by setting 2 of them to float left, I already got this result: http://home.scarlet.be/~vv991306/test.html Now I have to set the widths en heigths of...
5
1301
by: John | last post by:
I get a 'divide by zero' exception when I scroll in a subdirectory of 'My Pictures'. This subdirectory is full of .ico, .bmp, .png files that I use for button images in my Windows Forms projects. No viruses are found. This has been occurring for a year now... I don't know if it is a specific file, or just the rendering of the files to produce icons for the display in Explorer.exe that is the cause. Anyone have suggestions for me?
6
1982
by: nichughes | last post by:
Hello all, A question relating to http://www.entrust-systems.net/ Just for a change I have run into a problem that seems to be OS specific rather than browser specific - the box image that is acting as a faux border for the main text block shows nasty image effects on the outside when using either Firefox or Konqueror on Suse Linux. This image is set to resize with the browser window (and hence the text) and this seems to be what...
2
1573
by: marss | last post by:
I have a long page that contains few separate information blocks. When I print the page by means of window.print(), the content is automatically divided by pages. I look through and find I can do it if I load blocks in separate frames. But there is a new problem. There are ten or more blocks. When I load the content it is unreadable. - If frameset fits to the screen, then the result looks like many horizontal stripes with scrolling. The...
4
4445
by: Vicente García | last post by:
Hi, I have a problem, I am working with Visual Basic and I need to save a image in GIF format but Visual Studio always save the file in GIF89 format and I must save the image in GIF87 format. May anyone please tell me how I could save the image in GIF87 format or how I could convert a image format to GIF87? Thanks in advance
3
3371
by: =?Utf-8?B?UnVieSBOYWRsZXI=?= | last post by:
Hi EveryOne, Does some one knows a way or tool that knows how to divide image into regions with c# so if the image is like a table style i will now the positions of the columns? i can read the pixlels colors but it will be very slow. thanks
1
1035
by: _kOws | last post by:
Hi, I'm writing a program that loads an image and then apply JPEG algorithm on it. I need to apply such algorithm only to a quarter of the image, possibly selecting which quarter. I don't really know how to divide in quarter an image in Java: I think that if I can divide the image in 4 images then I can use each image as a quarter, and apply the algorithm as I'm doing now on the original
1
1729
by: Arnab das | last post by:
I am working on C# image processing. I have to divide an image into 1 cm squares and then I have to calculate the no of pixel in each of the square.How can I do this? Thanks in advance
0
8355
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.