home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2732
Discussions: 186,608, Posts: 2,227,062, Members: 230,243
Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
Old January 29th, 2008, 11:27 PM   Digg it!   #1 (permalink)
Senior Member
 
gigahertz205's Avatar
 
Join Date: Jan 2005
Location: New York
Posts: 884
Send a message via AIM to gigahertz205
Image Compression[C#]

So I'm trying to create an image compression program using binary partitioning, but I really have no idea. Instead of trying to find a program to do that, I just want to see how an image would be compressed using standard lossy JPEG (using DCT).

My problem is that I cannot find source code, or atleast for C#, of an image compression program using JPEG. I mean I tried C++ source code, but I had no idea how to read it (I dont know any C++). Does anyone know such source code, or at least help me get this thing started?

I just need to know how to work with images with programming as I dont have any experience in it. EX: JPEG divides the image into 8x8 blocks, apply transformation, etc, but I have no idea how I'm supposed to divide an image and do mathematical transformations to those blocks.

Any idea, or comment is appreciated.
__________________
Size 1 Rules!

gigahertz205 is offline   Reply With Quote
TechIMO.com Ads - Login or register for less ads.
How many errors does your computer have?

You no longer need to guess! This free stability scan and registry cleaner download will give you a complete diagnosis of your Windows registry, identifying errors and conflicts.

FREE instant scan


Guest, Register Free! to remove this ad and get your tech support questions answered in minutes!
Old January 30th, 2008, 12:57 AM     #2 (permalink)
Banned
 
Keymaker's Avatar
 
Join Date: Jan 2005
Location: Loveland, CO
Posts: 5,493
Blog Entries: 2
Send a message via ICQ to Keymaker Send a message via Yahoo to Keymaker
Code:
 for all x in new image (old y * xscale)
    for all y in new image (old y * xscale)
      array[x][y]=getInterpolation(x*xscale.y*yscale)

  return array;
}
var getInterpolation(x,y){
   return interpolate(
     getVar(floor x,floor y),
     getVar(floor x,ceil  y),
     getVar(ceil  x,floor y),
     getVar(ceil  x,ceil  y),
     x mod 1, y mod 1
   );
}
var getVar(){
  block = blocks[x/blocksize,y/blocksize];
  return block[x mod blocksize, y mod blocksize];
}

var interpolate(var tl, var tr, var bl, var br,x,y){
  //your own interpolate func
  //here's a sample
  return (tl*x)+(tr*(1-x))*y + (bl*x)+(br*(1-x))*(1-y);
}




You should be able to find source code for Infraview. I believe its GPL.


Last edited by Keymaker : January 30th, 2008 at 01:08 AM.
Keymaker is offline   Reply With Quote
Old July 3rd, 2008, 01:04 PM     #3 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 1
image quantization

hi,
i think i have the same problem discussed here.
I have to write an image compression program that compresses the image in blocks of N*N dimension (like jpeg where N=8). For the quantization process, rather then using the jpeg tables, i need to find some other criteria.
I'm stuck here... the only think i now is that the compression of the block is guided by minimun and maximum values of pixels in that particular block.
Does anyone know any transformation function that uses this parameters ?

petronsi is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
image compression help sixf00t4 Graphic Design and Digital Photography 12 August 18th, 2005 09:42 AM
Compression nwo75200 Multimedia and Audio 35 April 18th, 2005 06:17 PM
Drive Image 2002 & restoring image to a smaller partition videobruce Applications and Operating Systems 1 April 12th, 2005 03:00 PM
Halo2 Release date and first ever MP image...(huge image) Master Chief General Gaming Discussion 6 February 1st, 2004 08:55 AM

Most Active Discussions
Is It Just Me? (532)
Misery Loves Company... (1849)
Why Does the MOON Grow Bigger as It.. (18)
heatsink issue (10)
New Mobo (18)
UPGRADING C/D DRIVE TO 250GB & .. (14)
1 internet. 1 house. 3 computer. ho.. (13)
Is This A Compatible Gaming PC? (18)
SSD's, RAID, and External Backup (7)
Recent Discussions
help! jumbled text and computer.. (0)
DFI socket 939 board acting up (5)
Building my first PC and need s.. (2)
32 or 64 bit vista (4)
Big problem with my PC (2)
system restore 'next' button wo.. (2)
firewall (1)
C++ compiler suggestions (4)
Official World of Warcraft Thre.. (4529)
FS: Dell 6000 laptop, modded 36.. (2)
Apple iPod touch 16 GB $200 (4)
Six 28-Disc Cross Design Black .. (4)


All times are GMT -4. The time now is 12:31 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28