plsz i want the coding details of line
package vc.api;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;
import java.util.Random;
import javax.imageio.ImageIO;
import vc.controller.Controller;
/**
*
1. @author ????
*/
public class VCAPI {
private static BufferedImage pic1;
private static BufferedImage pic2;
private static BufferedImage out;
static int getBrightness(int rgb) {
int r,g,b;
Color pixColour = new Color(rgb);
r=pixColour.getRed();
g=pixColour.getGreen();
b=pixColour.getBlue();
rgb = (int)((r+g+b)/3);
return rgb;
}
//------------------------------------------------------------------------------
static BufferedImage monochrome(BufferedImage picture) {
int i,j,min=128,max=128,value=0,col;
for (i=0;i<picture.getHeight();i++){
for (j=0;j<picture.getWidth();j++) {
value=getBrightness(picture.getRGB(j,i));
if (value<min) min=value;
if (value>max) max=value;
}
}
value=(int)Math.ceil((max+min)/2);
for (i=0;i<picture.getHeight();i++){
for (j=0;j<picture.getWidth();j++) {
col=getBrightness(picture.getRGB(j,i));
if (col<value) picture.setRGB(j,i,-16777216);//black
else picture.setRGB(j,i,-1);//white
}
}
return picture;
}
//------------------------------------------------------------------------------
static BufferedImage meldImages(BufferedImage template, BufferedImage random) {
int i,j;
BufferedImage output = new BufferedImage(template.getWidth(),template.getHeight(),BufferedImage.TYPE_INT_RGB);
for (i=0;i<template.getHeight();i++){
for (j = 0; j < template.getWidth(); j++) {
2. **if (template.getRGB(j,i)<-8388608) {//black if
(random.getRGB(j,i)<-8388608)
output.setRGB(j,i,-1); else
output.setRGB(j,i,-16777216);**
========================================
}
else {
if (random.getRGB(j,i)<-8388608) output.setRGB(j,i,-16777216);
else output.setRGB(j,i,-1);
}
}
}
return output;
}
//------------------------------------------------------------------------------
static BufferedImage makeGrey(BufferedImage template) {//note; 0 is black in the top left corner, 1 has white in that corner
BufferedImage output = new BufferedImage(template.getWidth()*2,template.getHeight()*2,BufferedImage.TYPE_INT_RGB);
int i,j;
for (i=0;i<template.getHeight();i++){
for (j=0;j<template.getWidth();j++) {
if (template.getRGB(j,i)<-8388608) {//black
output.setRGB((j*2),(i*2),-16777216);//black
output.setRGB((j*2),(i*2)+1,-1);//white
output.setRGB((j*2)+1,(i*2),-1);//white
output.setRGB((j*2)+1,(i*2)+1,-16777216);//black
}
else {
output.setRGB((j*2),(i*2),-1);//white
output.setRGB((j*2),(i*2)+1,-16777216);//black
output.setRGB((j*2)+1,(i*2),-16777216);//black
output.setRGB((j*2)+1,(i*2)+1,-1);//white
}
}
}
return output;
}
in the above code i want details about the valule...in meldimage() function ....we can see the for loop...
that is
if (template.getRGB(j,i)<-8388608) {//black if
(random.getRGB(j,i)<-8388608)
output.setRGB(j,i,-1); else
output.setRGB(j,i,-16777216);
getRGB(j,i)<-8388608
why can put this value?
its default value ?
or if its any value of rgb
second setRGB(j,i,-16777216) y can use this value...its constant one
how 2 get this value...
plsz explain this code....its come visual cryptography grayconversion coding
plsz anybody helpme..for this code
what is use of this value?
why can check < -8388608?
how to got this value -8388608
plsz helpme
i want this coding details plsz friends helpme..
View Answers
Ads
Related Tutorials/Questions & Answers:
plsz i want the coding details of line
plsz i want the
coding details of line package vc.api;
import...
i want this
coding details plsz friends helpme... output;
}
in the above code
i want details about the valule
plsz i want the coding details of line
plsz i want the
coding details of line package vc.api;
import...?
how to got this value -8388608
plsz helpme
i want this
coding details plsz...
want details about the valule...in meldimage() function ....we can see
Advertisements
how i want to create a coding by this question?
how
i want to create a
coding by this question? Design and write a class named Person and its two subclasses named Student and Employee.
Make Lecturer and Admin subclasses of Employee.
A person has a name, address, phone number
i want to update values
i want to update values in my form
i have 2 submit buttons one... the edit button all text boxs need to enable so that
i can edit my
details and later once
i press update it need to update
details into database and before
problem i coding
problem
i coding
i have a problem in
coding a combobox containing a number of *.java program on click one of them that program should compile and run and display the result in other window
i want to learn Jquery
i want to learn Jquery
i want to learn jquery can u plz guide me
Yes, you can learn these technologies by yourself. Go through the following links:
Ajax Tutorials
JSON Tutorials
JQuery Tutorials
How should I learn coding?
How should
I learn
coding? Hello Programmers,
How should
I learn
coding?
I want to start it from beginning. Its better if someone provides me urls to learn it quickly.
Thanks
Hi,
Learning
coding is the first step
I want this jsp answers
I want this jsp answers
How can we declare third party classes and interfaces inside our jsp page?
How can we declare and definr global variables... for particular jsp pages?
If we
want to develop any jsp pages using eclipse where we can
I want this jsp answers
I want this jsp answers
How can we declare third party classes and interfaces inside our jsp page?
How can we declare and definr global variables... for particular jsp pages?
If we
want to develop any jsp pages using eclipse where we can
i want code for these programs
i want code for these programs Advances in operating system
Laboratory Work:
(The following programs can be executed on any available and suitable platform)
Design, develop and execute a program using any
i want to learn data science
i want to learn data science Hi,
I am beginner in Data Science and machine learning field.
I am searching for
the tutorials to learn:
i want... can learn the
topic "
i want to learn data science". Also tell me
i want to learn machine learning
i want to learn machine learning Hi,
I am beginner in Data Science and machine learning field.
I am searching for
the tutorials to learn:
i want... so that
I can learn the
topic "
i want to learn machine learning"
I want solution for this jsp program..
I want solution for this jsp program.. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*" %>
JSP Page
<%!
String
same thing i want but from db..
same thing
i want but from db.. http://www.roseindia.net/tutorial/javascript/dynamicCombo.html
same thing
i want but from db
I want to learn Hadoop from scratch
I want to learn Hadoop from scratch Hi,
I want to learn Hadoop from... for companies. Now
I want to learn Hadoop including all the technologies of it.
How....
I have 2 years of experience in Java, JDBC and Web application development.
I
I want to learn Hadoop from scratch
I want to learn Hadoop from scratch Hi,
I want to learn Hadoop from... for companies. Now
I want to learn Hadoop including all the technologies of it.
How....
I have 2 years of experience in Java, JDBC and Web application development.
I
i want print the following out put
i want print the following out put Hello sir
i want the following out put can u provide the program in c#
o/p;
HELLOLLEH
HELLLEH
HELEH
HEH
H
i want to display where i entered values to same page
i want to display where
i entered values to same page hi friends !!
i have a values from jsp page .and
i want to store that values into DB at the same time
i want to show immediatlly on same jsp page with tabular format
i want to display where i entered values to same page
i want to display where
i entered values to same page hi friends !!
i have a values from jsp page .and
i want to store that values into DB at the same time
i want to show immediatlly on same jsp page with tabular format
Can I learn AI without coding?
Can
I learn AI without
coding? Hi,
I am beginner in Data Science and machine learning field.
I am searching for
the tutorials to learn:
Can
I... that
I can learn the
topic "Can
I learn AI without
coding?". Also tell
Can I learn machine learning without coding?
Can
I learn machine learning without
coding? Hi,
I am beginner in Data Science and machine learning field.
I am searching for
the tutorials to learn:
Can
I learn machine learning without
coding?
Try to provide me good
i want to remove specific node in xml file
i want to remove specific node in xml file
<A>
<B>hi
<C>by
<A>
<B>hellow
<C>how r u ?
i want to delet node which is == hellow using java program please help me .
tanks in advance
i want 2 columns to be deleted in mysql
i want 2 columns to be deleted in mysql
i want 2 columns to be deleted in mysql The tables having the columns have no mapping
Use the given query:
ALTER TABLE table_name DROP col_name