Click here to Skip to main content
16,012,611 members
Home / Discussions / Java
   

Java

 
AnswerRe: android app login issue Pin
LawlessBaron8-Aug-13 22:15
LawlessBaron8-Aug-13 22:15 
GeneralRe: android app login issue Pin
Richard MacCutchan8-Aug-13 23:09
mveRichard MacCutchan8-Aug-13 23:09 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 2:28
LawlessBaron11-Aug-13 2:28 
GeneralRe: android app login issue Pin
Richard MacCutchan11-Aug-13 2:42
mveRichard MacCutchan11-Aug-13 2:42 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 3:27
LawlessBaron11-Aug-13 3:27 
GeneralRe: android app login issue Pin
Richard MacCutchan11-Aug-13 3:39
mveRichard MacCutchan11-Aug-13 3:39 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 3:47
LawlessBaron11-Aug-13 3:47 
Questionconverting problem from cmyk to rgb image Pin
Shankar nehrumaharajan7-Aug-13 3:21
Shankar nehrumaharajan7-Aug-13 3:21 
Hi,

i want to convert a cmyk type image into RGB Image.
if i use the below code the conversion happens but the image is not displaying properly.i can see block strike-through codes in my output image. any other way to convert CMYK to RGB.

Java
java.util.Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("JPEG");
               ImageReader reader = null;
               while(readers.hasNext()) {
                   reader = (ImageReader)readers.next();
                   if(reader.canReadRaster()) {
                       break;
                   }
               }

               //Stream the image file (the original CMYK image)
               ImageInputStream input =   ImageIO.createImageInputStream(fromFile);
               reader.setInput(input);

               //Read the image raster
               Raster raster = reader.readRaster(0, null);

               //Create a new RGB image
               BufferedImage bi = new BufferedImage(raster.getWidth(), raster.getHeight(),BufferedImage.TYPE_INT_RGB);

               //Fill the new image with the old raster
               bi.getRaster().setRect(raster);
           System.out.println("\n\n\n   bi.getColorModel().getColorSpace().getType()\n\n "+bi.getColorModel().getColorSpace().getType());



           //  BufferedImage bi = ImageIO.read(toFile);
               int colorSpaceType = bi.getColorModel().getColorSpace().getType();

                if( colorSpaceType == ColorSpace.TYPE_CMYK)
                {
                    System.out.println("\n\n\n is CMYK image \n\n\n");
                }
                else if(colorSpaceType == ColorSpace.TYPE_RGB)
                {
                System.out.println("\n\n\n is RGB image \n\n\n");
                ImageIO.write(bi, "JPEG", new File("d:\\hi.jpg"));

                }

Questionhow to draw smooth curve with java? Pin
xiaobai13795-Aug-13 17:32
xiaobai13795-Aug-13 17:32 
SuggestionRe: how to draw smooth curve with java? Pin
Richard MacCutchan5-Aug-13 20:48
mveRichard MacCutchan5-Aug-13 20:48 
Questioni can't pause the song in this code Pin
Member 101909835-Aug-13 8:52
Member 101909835-Aug-13 8:52 
AnswerRe: i can't pause the song in this code Pin
Richard MacCutchan5-Aug-13 20:46
mveRichard MacCutchan5-Aug-13 20:46 
GeneralRe: i can't pause the song in this code Pin
Member 101909836-Aug-13 4:42
Member 101909836-Aug-13 4:42 
GeneralRe: i can't pause the song in this code Pin
Richard MacCutchan6-Aug-13 4:56
mveRichard MacCutchan6-Aug-13 4:56 
QuestionTwo salt Values? Pin
chdboy3-Aug-13 5:14
chdboy3-Aug-13 5:14 
AnswerRe: Two salt Values? Pin
jschell3-Aug-13 5:18
jschell3-Aug-13 5:18 
AnswerRe: Two salt Values? Pin
Bernhard Hiller4-Aug-13 22:32
Bernhard Hiller4-Aug-13 22:32 
Questionhow can i solve method RequestProcessor with using thread Pin
Zeff Portal31-Jul-13 15:39
Zeff Portal31-Jul-13 15:39 
AnswerRe: how can i solve method RequestProcessor with using thread Pin
Richard MacCutchan31-Jul-13 21:02
mveRichard MacCutchan31-Jul-13 21:02 
Questionread idmef.xml file Pin
peniya30-Jul-13 5:00
peniya30-Jul-13 5:00 
AnswerRe: read idmef.xml file Pin
Richard MacCutchan30-Jul-13 5:52
mveRichard MacCutchan30-Jul-13 5:52 
GeneralRe: read idmef.xml file Pin
peniya30-Jul-13 5:55
peniya30-Jul-13 5:55 
GeneralRe: read idmef.xml file Pin
Richard MacCutchan30-Jul-13 6:27
mveRichard MacCutchan30-Jul-13 6:27 
Questionread .csv file and write relationship between data Pin
peniya30-Jul-13 4:43
peniya30-Jul-13 4:43 
AnswerRe: read .csv file and write relationship between data Pin
Richard MacCutchan30-Jul-13 5:51
mveRichard MacCutchan30-Jul-13 5:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.